Skip to content

Commit

Permalink
Merge pull request #59 from sourcegraph/nsc/implementations
Browse files Browse the repository at this point in the history
emit overridden_symbols for Go to Implementations
  • Loading branch information
Strum355 authored Jul 18, 2023
2 parents 582c898 + e1d754c commit f2c67eb
Show file tree
Hide file tree
Showing 29 changed files with 532 additions and 378 deletions.
2 changes: 1 addition & 1 deletion semanticdb-kotlinc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ dependencies {
testImplementation(kotlin("reflect"))
testImplementation(kotlin("script-runtime", "1.5.0"))

snapshotsImplementation("com.sourcegraph", "lsif-java_2.13", "0.6.12")
snapshotsImplementation("com.sourcegraph", "scip-java_2.13", "0.8.24")
}

tasks.withType<KotlinCompile> {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package snapshots;

public class ClassConsumer {
// ^^^^^^^^^^^^^ definition semanticdb maven . . snapshots/ClassConsumer#
// documentation ```java\npublic class ClassConsumer\n```
// ^^^^^^^^^^^^^ definition semanticdb maven . . snapshots/ClassConsumer#`<init>`().
// documentation ```java\npublic ClassConsumer()\n```
public static void run() {
// ^^^ definition semanticdb maven . . snapshots/ClassConsumer#run().
// documentation ```java\npublic static void run()\n```
System.out.println(new Class().getAsdf());
// ^^^^^^ reference semanticdb maven jdk 8 java/lang/System#
// ^^^ reference semanticdb maven jdk 8 java/lang/System#out.
// ^^^^^^^ reference semanticdb maven jdk 8 java/io/PrintStream#println(+9).
// ^^^^^ reference semanticdb maven . . snapshots/Class#`<init>`(+1).
// ^^^^^^^ reference semanticdb maven . . snapshots/Class#getAsdf().
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package snapshots;

public class CompanionConsumer {
// ^^^^^^^^^^^^^^^^^ definition semanticdb maven . . snapshots/CompanionConsumer#
// documentation ```java\npublic class CompanionConsumer\n```
CompanionConsumer() {
// ^^^^^^^^^^^^^^^^^ definition semanticdb maven . . snapshots/CompanionConsumer#`<init>`().
// documentation ```java\nCompanionConsumer()\n```
CompanionOwner.Companion.create();
// ^^^^^^^^^^^^^^ reference semanticdb maven . . snapshots/CompanionOwner#
// ^^^^^^^^^ reference semanticdb maven . . snapshots/CompanionOwner#Companion.
// ^^^^^^ reference semanticdb maven . . snapshots/CompanionOwner#Companion#create().
new CompanionOwner().create();
// ^^^^^^^^^^^^^^ reference semanticdb maven . . snapshots/CompanionOwner#`<init>`().
// ^^^^^^ reference semanticdb maven . . snapshots/CompanionOwner#create().
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package snapshots;

public class KotlinClass {
// ^^^^^^^^^^^ definition semanticdb maven . . snapshots/KotlinClass#
// documentation ```java\npublic class KotlinClass\n```
KotlinClass() throws Class {
// ^^^^^^^^^^^ definition semanticdb maven . . snapshots/KotlinClass#`<init>`().
// documentation ```java\nKotlinClass() throws Class\n```
// ^^^^^ reference semanticdb maven . . snapshots/Class#
throw new Class();
// ^^^^^ reference semanticdb maven . . snapshots/Class#`<init>`(+1).
}

void test() throws Class {
// ^^^^ definition semanticdb maven . . snapshots/KotlinClass#test().
// documentation ```java\nvoid test() throws Class\n```
// ^^^^^ reference semanticdb maven . . snapshots/Class#
throw new Class(1, "");
// ^^^^^ reference semanticdb maven . . snapshots/Class#`<init>`().
}

void other() throws Class {
// ^^^^^ definition semanticdb maven . . snapshots/KotlinClass#other().
// documentation ```java\nvoid other() throws Class\n```
// ^^^^^ reference semanticdb maven . . snapshots/Class#
throw new Class(1);
// ^^^^^ reference semanticdb maven . . snapshots/Class#`<init>`(+2).
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package snapshots;

import kotlin.collections.CollectionsKt;
// ^^^^^^ reference semanticdb maven . . kotlin/
// ^^^^^^^^^^^ reference semanticdb maven . . kotlin/collections/
// ^^^^^^^^^^^^^ reference semanticdb maven . . kotlin/collections/CollectionsKt#
import kotlin.text.StringsKt;
// ^^^^^^ reference semanticdb maven . . kotlin/
// ^^^^ reference semanticdb maven . . kotlin/text/
// ^^^^^^^^^ reference semanticdb maven . . kotlin/text/StringsKt#


public class KotlinLambdas {
// ^^^^^^^^^^^^^ definition semanticdb maven . . snapshots/KotlinLambdas#
// documentation ```java\npublic class KotlinLambdas\n```
// ^^^^^^^^^^^^^ definition semanticdb maven . . snapshots/KotlinLambdas#`<init>`().
// documentation ```java\npublic KotlinLambdas()\n```
public void test() {
// ^^^^ definition semanticdb maven . . snapshots/KotlinLambdas#test().
// documentation ```java\npublic void test()\n```
LambdasKt.getX();// TODO figure out emit getX on kotlin side
// ^^^^^^^^^ reference semanticdb maven . . snapshots/LambdasKt#
// ^^^^ reference semanticdb maven . . snapshots/LambdasKt#getX().

kotlin.collections.CollectionsKt.listOf();
// ^^^^^^ reference semanticdb maven . . kotlin/
// ^^^^^^^^^^^ reference semanticdb maven . . kotlin/collections/
// ^^^^^^^^^^^^^ reference semanticdb maven . . kotlin/collections/CollectionsKt#
// ^^^^^^ reference semanticdb maven . . kotlin/collections/CollectionsKt__CollectionsKt#listOf().
FunctionsKt.sampleText("");
// ^^^^^^^^^^^ reference semanticdb maven . . snapshots/FunctionsKt#
// ^^^^^^^^^^ reference semanticdb maven . . snapshots/FunctionsKt#sampleText().
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package snapshots;

public class ObjectKtConsumer {
// ^^^^^^^^^^^^^^^^ definition semanticdb maven . . snapshots/ObjectKtConsumer#
// documentation ```java\npublic class ObjectKtConsumer\n```
// ^^^^^^^^^^^^^^^^ definition semanticdb maven . . snapshots/ObjectKtConsumer#`<init>`().
// documentation ```java\npublic ObjectKtConsumer()\n```
public static void run() {
// ^^^ definition semanticdb maven . . snapshots/ObjectKtConsumer#run().
// documentation ```java\npublic static void run()\n```
ObjectKt.INSTANCE.fail("boom");
// ^^^^^^^^ reference semanticdb maven . . snapshots/ObjectKt#
// ^^^^^^^^ reference semanticdb maven . . snapshots/ObjectKt#INSTANCE.
// ^^^^ reference semanticdb maven . . snapshots/ObjectKt#fail().
}
}
Loading

0 comments on commit f2c67eb

Please sign in to comment.