From c2dcbfc15fee3cf6767b5b88adf3887e0c2473af Mon Sep 17 00:00:00 2001 From: Dmitrii Gridin Date: Thu, 2 Mar 2023 12:42:40 +0100 Subject: [PATCH] [KCRI] update testData for classes and objects ^KTIJ-24827 GitOrigin-RevId: 31976f26fe8789fc7982527fc5c962b989ff6de1 --- .../compilerIndex/classOrObject/companion/Explicit.kt | 2 +- .../classOrObject/companion/ExplicitMethod.kt | 3 +++ .../compilerIndex/classOrObject/companion/Implicit.kt | 2 +- .../classOrObject/companion/ImplicitMethod.kt | 3 +++ .../compilerIndex/classOrObject/companion/Instance.java | 2 +- .../classOrObject/companion/InstanceExplicit.kt | 2 +- .../companion/{Usage.java => MethodUsage.java} | 2 +- .../compilerIndex/classOrObject/companion/Type.java | 2 +- .../testData/compilerIndex/classOrObject/companion/Type.kt | 2 +- .../compilerIndex/classOrObject/companion/testConfig.json | 6 ++++-- .../innerClass/{Usage.kt => ConstructorUsage.kt} | 2 +- .../{JavaUsage.java => JavaConstructorUsage.java} | 2 +- .../classOrObject/innerClass/JavaTypeUsage.java | 4 ++++ .../compilerIndex/classOrObject/innerClass/TypeUsage.kt | 2 ++ .../compilerIndex/classOrObject/innerClass/testConfig.json | 6 ++++-- .../{Usage.kt => ConstructorUsage.kt} | 2 +- .../innerClassWithPackage/JavaConstructorUsage.java | 7 +++++++ ...{JavaUsage.java => JavaConstructorUsageWithImport.java} | 2 +- .../classOrObject/innerClassWithPackage/JavaTypeUsage.java | 6 ++++++ .../classOrObject/innerClassWithPackage/TypeUsage.kt | 4 ++++ .../classOrObject/innerClassWithPackage/testConfig.json | 7 +++++-- .../compilerIndex/classOrObject/namedCompanion/Explicit.kt | 2 +- .../classOrObject/namedCompanion/ExplicitMethod.kt | 3 +++ .../compilerIndex/classOrObject/namedCompanion/Implicit.kt | 2 +- .../classOrObject/namedCompanion/ImplicitMethod.kt | 3 +++ .../classOrObject/namedCompanion/Instance.java | 2 +- .../classOrObject/namedCompanion/InstanceExplicit.kt | 2 +- .../namedCompanion/{Usage.java => MethodUsage.java} | 2 +- .../compilerIndex/classOrObject/namedCompanion/Type.java | 2 +- .../compilerIndex/classOrObject/namedCompanion/Type.kt | 2 +- .../classOrObject/namedCompanion/testConfig.json | 6 ++++-- .../nestedClass/{Usage.kt => ConstructorUsage.kt} | 2 +- .../{JavaUsage.java => JavaConstructorUsage.java} | 2 +- .../classOrObject/nestedClass/JavaTypeUsage.java | 4 ++++ .../compilerIndex/classOrObject/nestedClass/TypeUsage.kt | 2 ++ .../classOrObject/nestedClass/testConfig.json | 6 ++++-- .../classOrObject/nestedObject/JavaAsCallUsage.java | 5 +++++ .../classOrObject/nestedObject/JavaAsTypeUsage.java | 4 ++++ .../classOrObject/nestedObject/JavaUsage.java | 5 ----- .../nestedObject/{Usage.kt => UsageAsCall.kt} | 2 +- .../classOrObject/nestedObject/UsageAsType.kt | 3 +++ .../classOrObject/nestedObject/testConfig.json | 6 ++++-- .../classOrObject/object/JavaInstanceUsage.java | 5 +++++ .../compilerIndex/classOrObject/object/JavaTypeUsage.java | 4 ++++ .../compilerIndex/classOrObject/object/JavaUsage.java | 5 ----- .../compilerIndex/classOrObject/object/MethodUsage.kt | 3 +++ .../compilerIndex/classOrObject/object/TypeUsage.kt | 2 ++ .../testData/compilerIndex/classOrObject/object/Usage.kt | 2 +- .../compilerIndex/classOrObject/object/testConfig.json | 5 ++++- 49 files changed, 118 insertions(+), 45 deletions(-) create mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/ExplicitMethod.kt create mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/ImplicitMethod.kt rename plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/{Usage.java => MethodUsage.java} (80%) rename plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/{Usage.kt => ConstructorUsage.kt} (55%) rename plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/{JavaUsage.java => JavaConstructorUsage.java} (64%) create mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/JavaTypeUsage.java create mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/TypeUsage.kt rename plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/{Usage.kt => ConstructorUsage.kt} (64%) create mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/JavaConstructorUsage.java rename plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/{JavaUsage.java => JavaConstructorUsageWithImport.java} (68%) create mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/JavaTypeUsage.java create mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/TypeUsage.kt create mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/ExplicitMethod.kt create mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/ImplicitMethod.kt rename plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/{Usage.java => MethodUsage.java} (80%) rename plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/{Usage.kt => ConstructorUsage.kt} (53%) rename plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/{JavaUsage.java => JavaConstructorUsage.java} (62%) create mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/JavaTypeUsage.java create mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/TypeUsage.kt create mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/JavaAsCallUsage.java create mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/JavaAsTypeUsage.java delete mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/JavaUsage.java rename plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/{Usage.kt => UsageAsCall.kt} (62%) create mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/UsageAsType.kt create mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/JavaInstanceUsage.java create mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/JavaTypeUsage.java delete mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/JavaUsage.java create mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/MethodUsage.kt create mode 100644 plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/TypeUsage.kt diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Explicit.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Explicit.kt index cb13de3391b5..0bf4c13cd504 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Explicit.kt +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Explicit.kt @@ -1,3 +1,3 @@ fun Explicit() { - MainClass.Companion.f() + MainClass.Companion } \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/ExplicitMethod.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/ExplicitMethod.kt new file mode 100644 index 000000000000..ec79eabd45b7 --- /dev/null +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/ExplicitMethod.kt @@ -0,0 +1,3 @@ +fun ExplicitMethod() { + MainClass.Companion.f() +} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Implicit.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Implicit.kt index 4687f34e404b..01a112c0bbb2 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Implicit.kt +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Implicit.kt @@ -1,3 +1,3 @@ fun Implicit() { - MainClass.f() + MainClass } \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/ImplicitMethod.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/ImplicitMethod.kt new file mode 100644 index 000000000000..f2ac3a5bb03b --- /dev/null +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/ImplicitMethod.kt @@ -0,0 +1,3 @@ +fun ImplicitMethod() { + MainClass.f() +} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Instance.java b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Instance.java index 8ad913fceed2..f2b52b1a6c41 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Instance.java +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Instance.java @@ -1,5 +1,5 @@ class Instance { void main() { - new MainClass.Companion.T(); + Object i = MainClass.Companion; } } \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/InstanceExplicit.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/InstanceExplicit.kt index b768b0890069..8c860966fee5 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/InstanceExplicit.kt +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/InstanceExplicit.kt @@ -1,3 +1,3 @@ fun InstanceExplicit() { - val t = MainClass.Companion.T() + val t = MainClass.Companion } \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Usage.java b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/MethodUsage.java similarity index 80% rename from plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Usage.java rename to plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/MethodUsage.java index 17d3cf1cde14..dcbf6e35af54 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Usage.java +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/MethodUsage.java @@ -1,4 +1,4 @@ -class Usage { +class MethodUsage { public static void main(String[] args) { MainClass.Companion.f(); } diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Type.java b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Type.java index 8c25ca586a1c..0a500d146d4f 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Type.java +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Type.java @@ -1,4 +1,4 @@ class Type { - void main(MainClass.Companion.T t) { + void main(MainClass.Companion t) { } } \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Type.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Type.kt index c7d0c2f930e8..72111cd79a95 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Type.kt +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/Type.kt @@ -1,3 +1,3 @@ -fun Type(t: MainClass.Companion.T) { +fun Type(t: MainClass.Companion) { } \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/testConfig.json b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/testConfig.json index d386e75c4d1c..0cc73fe7082c 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/testConfig.json +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/companion/testConfig.json @@ -2,10 +2,12 @@ "mainFile": "Main.kt", "usages": [ "Explicit.kt", + "ExplicitMethod.kt", + "Implicit.kt", "Instance.java", "InstanceExplicit.kt", + "MethodUsage.java", "Type.java", - "Type.kt", - "Usage.java" + "Type.kt" ] } diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/Usage.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/ConstructorUsage.kt similarity index 55% rename from plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/Usage.kt rename to plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/ConstructorUsage.kt index a67ca606b2d9..20f1c2ffd0d5 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/Usage.kt +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/ConstructorUsage.kt @@ -1,3 +1,3 @@ -fun d() { +fun constructorUsage() { MainClass().NestedClass() } \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/JavaUsage.java b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/JavaConstructorUsage.java similarity index 64% rename from plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/JavaUsage.java rename to plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/JavaConstructorUsage.java index d3a88c9d3adf..f0b8f1cb1199 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/JavaUsage.java +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/JavaConstructorUsage.java @@ -1,4 +1,4 @@ -public class JavaUsage { +public class JavaConstructorUsage { void t() { new MainClass().new NestedClass(); } diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/JavaTypeUsage.java b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/JavaTypeUsage.java new file mode 100644 index 000000000000..7a335f67b28e --- /dev/null +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/JavaTypeUsage.java @@ -0,0 +1,4 @@ +public class JavaTypeUsage { + void t(MainClass.NestedClass n) { + } +} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/TypeUsage.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/TypeUsage.kt new file mode 100644 index 000000000000..abfab8bd9813 --- /dev/null +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/TypeUsage.kt @@ -0,0 +1,2 @@ +fun typeUsage(t: MainClass.NestedClass) { +} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/testConfig.json b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/testConfig.json index 484de6b799a6..45d43ef831bd 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/testConfig.json +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClass/testConfig.json @@ -1,7 +1,9 @@ { "mainFile": "MainClass.kt", "usages": [ - "JavaUsage.java", - "Usage.kt" + "ConstructorUsage.kt", + "JavaConstructorUsage.java", + "JavaTypeUsage.java", + "TypeUsage.kt" ] } diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/Usage.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/ConstructorUsage.kt similarity index 64% rename from plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/Usage.kt rename to plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/ConstructorUsage.kt index 08912096af4d..6a5c994df067 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/Usage.kt +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/ConstructorUsage.kt @@ -1,3 +1,3 @@ -fun d() { +fun constructorUsage() { one.two.three.MainClass().NestedClass() } \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/JavaConstructorUsage.java b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/JavaConstructorUsage.java new file mode 100644 index 000000000000..ac2e7ea03ca2 --- /dev/null +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/JavaConstructorUsage.java @@ -0,0 +1,7 @@ +package one.two.three; + +public class JavaConstructorUsage { + void t() { + new MainClass().new NestedClass(); + } +} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/JavaUsage.java b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/JavaConstructorUsageWithImport.java similarity index 68% rename from plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/JavaUsage.java rename to plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/JavaConstructorUsageWithImport.java index 64a360521737..08dbc793fde2 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/JavaUsage.java +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/JavaConstructorUsageWithImport.java @@ -1,6 +1,6 @@ import one.two.three.MainClass; -public class JavaUsage { +public class JavaConstructorUsageWithImport { void t() { new MainClass().new NestedClass(); } diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/JavaTypeUsage.java b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/JavaTypeUsage.java new file mode 100644 index 000000000000..b28fb7cd0bd8 --- /dev/null +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/JavaTypeUsage.java @@ -0,0 +1,6 @@ +package one.two.three; + +public class JavaTypeUsage { + void t(MainClass.NestedClass n) { + } +} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/TypeUsage.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/TypeUsage.kt new file mode 100644 index 000000000000..07bb2ac4a5b3 --- /dev/null +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/TypeUsage.kt @@ -0,0 +1,4 @@ +package one.two.three; + +fun typeUsage(t: MainClass.NestedClass) { +} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/testConfig.json b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/testConfig.json index 484de6b799a6..e26adbdaf6f6 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/testConfig.json +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/innerClassWithPackage/testConfig.json @@ -1,7 +1,10 @@ { "mainFile": "MainClass.kt", "usages": [ - "JavaUsage.java", - "Usage.kt" + "ConstructorUsage.kt", + "JavaConstructorUsage.java", + "JavaConstructorUsageWithImport.java", + "JavaTypeUsage.java", + "TypeUsage.kt" ] } diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Explicit.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Explicit.kt index cd9588a13dfb..40c38ff68d6b 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Explicit.kt +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Explicit.kt @@ -1,3 +1,3 @@ fun Explicit() { - MainClass.Name.f() + MainClass.Name } \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/ExplicitMethod.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/ExplicitMethod.kt new file mode 100644 index 000000000000..bafd5a584630 --- /dev/null +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/ExplicitMethod.kt @@ -0,0 +1,3 @@ +fun ExplicitMethod() { + MainClass.Name.f() +} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Implicit.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Implicit.kt index 4687f34e404b..01a112c0bbb2 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Implicit.kt +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Implicit.kt @@ -1,3 +1,3 @@ fun Implicit() { - MainClass.f() + MainClass } \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/ImplicitMethod.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/ImplicitMethod.kt new file mode 100644 index 000000000000..f2ac3a5bb03b --- /dev/null +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/ImplicitMethod.kt @@ -0,0 +1,3 @@ +fun ImplicitMethod() { + MainClass.f() +} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Instance.java b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Instance.java index 5d5d7a18e7cd..8632bacb8059 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Instance.java +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Instance.java @@ -1,5 +1,5 @@ class Instance { void main() { - new MainClass.Name.T(); + Object n = MainClass.Name; } } \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/InstanceExplicit.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/InstanceExplicit.kt index 772534e5a7f1..8797827696ab 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/InstanceExplicit.kt +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/InstanceExplicit.kt @@ -1,3 +1,3 @@ fun InstanceExplicit() { - val t = MainClass.Name.T() + MainClass.Name } \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Usage.java b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/MethodUsage.java similarity index 80% rename from plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Usage.java rename to plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/MethodUsage.java index c5ae0f30fafd..b03a66358a09 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Usage.java +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/MethodUsage.java @@ -1,4 +1,4 @@ -class Usage { +class MethodUsage { public static void main(String[] args) { MainClass.Name.f(); } diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Type.java b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Type.java index 6a9c0255bc7c..bb018f0d4231 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Type.java +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Type.java @@ -1,4 +1,4 @@ class Type { - void main(MainClass.Name.T t) { + void main(MainClass.Name t) { } } \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Type.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Type.kt index eb58559d1f72..898aa29e85cc 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Type.kt +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/Type.kt @@ -1,3 +1,3 @@ -fun Type(t: MainClass.Name.T) { +fun Type(t: MainClass.Name) { } \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/testConfig.json b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/testConfig.json index d386e75c4d1c..0cc73fe7082c 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/testConfig.json +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/namedCompanion/testConfig.json @@ -2,10 +2,12 @@ "mainFile": "Main.kt", "usages": [ "Explicit.kt", + "ExplicitMethod.kt", + "Implicit.kt", "Instance.java", "InstanceExplicit.kt", + "MethodUsage.java", "Type.java", - "Type.kt", - "Usage.java" + "Type.kt" ] } diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/Usage.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/ConstructorUsage.kt similarity index 53% rename from plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/Usage.kt rename to plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/ConstructorUsage.kt index 3105b2f4a2fb..097f68ccf7fb 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/Usage.kt +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/ConstructorUsage.kt @@ -1,3 +1,3 @@ -fun d() { +fun constructorUsage() { MainClass.NestedClass() } \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/JavaUsage.java b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/JavaConstructorUsage.java similarity index 62% rename from plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/JavaUsage.java rename to plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/JavaConstructorUsage.java index 788688e976ec..e0d24e4afa90 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/JavaUsage.java +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/JavaConstructorUsage.java @@ -1,4 +1,4 @@ -public class JavaUsage { +public class JavaConstructorUsage { void t() { new MainClass.NestedClass(); } diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/JavaTypeUsage.java b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/JavaTypeUsage.java new file mode 100644 index 000000000000..17c0806063a2 --- /dev/null +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/JavaTypeUsage.java @@ -0,0 +1,4 @@ +public class JavaTypeUsage { + void t(MainClass.NestedClass nestedClass) { + } +} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/TypeUsage.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/TypeUsage.kt new file mode 100644 index 000000000000..abfab8bd9813 --- /dev/null +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/TypeUsage.kt @@ -0,0 +1,2 @@ +fun typeUsage(t: MainClass.NestedClass) { +} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/testConfig.json b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/testConfig.json index 484de6b799a6..45d43ef831bd 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/testConfig.json +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedClass/testConfig.json @@ -1,7 +1,9 @@ { "mainFile": "MainClass.kt", "usages": [ - "JavaUsage.java", - "Usage.kt" + "ConstructorUsage.kt", + "JavaConstructorUsage.java", + "JavaTypeUsage.java", + "TypeUsage.kt" ] } diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/JavaAsCallUsage.java b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/JavaAsCallUsage.java new file mode 100644 index 000000000000..14322e359557 --- /dev/null +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/JavaAsCallUsage.java @@ -0,0 +1,5 @@ +public class JavaAsCallUsage { + void t() { + Object f = MainClass.NestedClass.A.B.F.INSTANCE; + } +} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/JavaAsTypeUsage.java b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/JavaAsTypeUsage.java new file mode 100644 index 000000000000..a6385e04fc04 --- /dev/null +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/JavaAsTypeUsage.java @@ -0,0 +1,4 @@ +public class JavaAsTypeUsage { + void t(MainClass.NestedClass.A.B.F f) { + } +} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/JavaUsage.java b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/JavaUsage.java deleted file mode 100644 index a98700dc4770..000000000000 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/JavaUsage.java +++ /dev/null @@ -1,5 +0,0 @@ -public class JavaUsage { - void t() { - MainClass.NestedClass.A.B.F f = MainClass.NestedClass.A.B.F.INSTANCE; - } -} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/Usage.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/UsageAsCall.kt similarity index 62% rename from plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/Usage.kt rename to plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/UsageAsCall.kt index 484d4ef294af..a7ab9c1363eb 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/Usage.kt +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/UsageAsCall.kt @@ -1,3 +1,3 @@ -fun d() { +fun usageAsCall() { MainClass.NestedClass.A.B.F } \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/UsageAsType.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/UsageAsType.kt new file mode 100644 index 000000000000..5d040dd52646 --- /dev/null +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/UsageAsType.kt @@ -0,0 +1,3 @@ +fun usageAsType(f: MainClass.NestedClass.A.B.F) { + +} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/testConfig.json b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/testConfig.json index 484de6b799a6..b028270c9f9a 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/testConfig.json +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/nestedObject/testConfig.json @@ -1,7 +1,9 @@ { "mainFile": "MainClass.kt", "usages": [ - "JavaUsage.java", - "Usage.kt" + "JavaAsCallUsage.java", + "JavaAsTypeUsage.java", + "UsageAsCall.kt", + "UsageAsType.kt" ] } diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/JavaInstanceUsage.java b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/JavaInstanceUsage.java new file mode 100644 index 000000000000..e22ad624c4a4 --- /dev/null +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/JavaInstanceUsage.java @@ -0,0 +1,5 @@ +public class JavaInstanceUsage { + void t() { + Object instance = MyObject.INSTANCE; + } +} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/JavaTypeUsage.java b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/JavaTypeUsage.java new file mode 100644 index 000000000000..f8a9d384a822 --- /dev/null +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/JavaTypeUsage.java @@ -0,0 +1,4 @@ +public class JavaTypeUsage { + void t(MyObject obj) { + } +} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/JavaUsage.java b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/JavaUsage.java deleted file mode 100644 index dca67db51f74..000000000000 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/JavaUsage.java +++ /dev/null @@ -1,5 +0,0 @@ -public class JavaUsage { - void t() { - MyObject instance = MyObject.INSTANCE; - } -} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/MethodUsage.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/MethodUsage.kt new file mode 100644 index 000000000000..1aaa0b4a8370 --- /dev/null +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/MethodUsage.kt @@ -0,0 +1,3 @@ +fun methodUsage() { + MyObject.a +} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/TypeUsage.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/TypeUsage.kt new file mode 100644 index 000000000000..ad988e2f8da0 --- /dev/null +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/TypeUsage.kt @@ -0,0 +1,2 @@ +fun typeUsage(obj: MyObject) { +} \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/Usage.kt b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/Usage.kt index c72f3f215de5..8509f2bdbd0f 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/Usage.kt +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/Usage.kt @@ -1,3 +1,3 @@ fun d() { - MyObject.a + MyObject } \ No newline at end of file diff --git a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/testConfig.json b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/testConfig.json index 32ceda50d4ec..2e7105f39840 100644 --- a/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/testConfig.json +++ b/plugins/kotlin/compiler-reference-index/tests/testData/compilerIndex/classOrObject/object/testConfig.json @@ -1,8 +1,11 @@ { "mainFile": "MyObject.kt", "usages": [ - "JavaUsage.java", + "JavaInstanceUsage.java", + "JavaTypeUsage.java", + "MethodUsage.kt", "MyObject.kt", + "TypeUsage.kt", "Usage.kt" ] }