Skip to content

Commit a7cd44c

Browse files
dimonchik0036Space Team
authored andcommitted
[LC] PsiClassRenderer: render DefaultImpls nested classes
They cannot be collected by Kotlin PSI since they are materialized only on the backend ^KT-80690
1 parent fbae10c commit a7cd44c

26 files changed

+120
-26
lines changed

compiler/testData/asJava/lightClasses/lightClassByPsi/DelegatedProperty.descriptors.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ public static abstract interface Delegate /* Container.Delegate*/<R> {
5858

5959
public abstract void setValue(@org.jetbrains.annotations.Nullable() java.lang.Object, @org.jetbrains.annotations.NotNull() kotlin.reflect.KProperty<?>, R);// setValue(java.lang.Object, kotlin.reflect.KProperty<?>, R)
6060

61-
class DefaultImpls ...
61+
public static final class DefaultImpls /* Container.Delegate.DefaultImpls*/ {
62+
public static R getValue(@org.jetbrains.annotations.NotNull() Container.Delegate, @org.jetbrains.annotations.Nullable() java.lang.Object, @org.jetbrains.annotations.NotNull() kotlin.reflect.KProperty<?>);// getValue(Container.Delegate, java.lang.Object, kotlin.reflect.KProperty<?>)
63+
64+
public static void setValue(@org.jetbrains.annotations.NotNull() Container.Delegate, @org.jetbrains.annotations.Nullable() java.lang.Object, @org.jetbrains.annotations.NotNull() kotlin.reflect.KProperty<?>, R);// setValue(Container.Delegate, java.lang.Object, kotlin.reflect.KProperty<?>, R)
65+
}
6266
}
6367

6468
public static final class Derived /* Container.Derived*/ extends Container.Base {

compiler/testData/asJava/lightClasses/lightClassByPsi/DelegatedProperty.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ public static abstract interface Delegate /* Container.Delegate*/<R> {
5858

5959
public abstract void setValue(@org.jetbrains.annotations.Nullable() @org.jetbrains.annotations.Nullable() java.lang.Object, @org.jetbrains.annotations.NotNull() @org.jetbrains.annotations.NotNull() kotlin.reflect.KProperty<?>, R);// setValue(@org.jetbrains.annotations.Nullable() java.lang.Object, @org.jetbrains.annotations.NotNull() kotlin.reflect.KProperty<?>, R)
6060

61-
class DefaultImpls ...
61+
public static final class DefaultImpls /* Container.Delegate.DefaultImpls*/ {
62+
public static <R> R getValue(@org.jetbrains.annotations.NotNull() @org.jetbrains.annotations.NotNull() Container.Delegate<R>, @org.jetbrains.annotations.Nullable() @org.jetbrains.annotations.Nullable() java.lang.Object, @org.jetbrains.annotations.NotNull() @org.jetbrains.annotations.NotNull() kotlin.reflect.KProperty<?>);// <R> getValue(@org.jetbrains.annotations.NotNull() Container.Delegate<R>, @org.jetbrains.annotations.Nullable() java.lang.Object, @org.jetbrains.annotations.NotNull() kotlin.reflect.KProperty<?>)
63+
64+
public static <R> void setValue(@org.jetbrains.annotations.NotNull() @org.jetbrains.annotations.NotNull() Container.Delegate<R>, @org.jetbrains.annotations.Nullable() @org.jetbrains.annotations.Nullable() java.lang.Object, @org.jetbrains.annotations.NotNull() @org.jetbrains.annotations.NotNull() kotlin.reflect.KProperty<?>, R);// <R> setValue(@org.jetbrains.annotations.NotNull() Container.Delegate<R>, @org.jetbrains.annotations.Nullable() java.lang.Object, @org.jetbrains.annotations.NotNull() kotlin.reflect.KProperty<?>, R)
65+
}
6266
}
6367

6468
public static final class Derived /* Container.Derived*/ extends Container.Base {

compiler/testData/asJava/lightClasses/lightClassByPsi/DelegatedProperty.kmp.lib.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ public static abstract interface Delegate /* Container.Delegate*/<R> {
5858

5959
public abstract void setValue(@org.jetbrains.annotations.Nullable() @org.jetbrains.annotations.Nullable() java.lang.Object, @org.jetbrains.annotations.NotNull() @org.jetbrains.annotations.NotNull() kotlin.reflect.KProperty<?>, R);// setValue(@org.jetbrains.annotations.Nullable() java.lang.Object, @org.jetbrains.annotations.NotNull() kotlin.reflect.KProperty<?>, R)
6060

61-
class DefaultImpls ...
61+
public static final class DefaultImpls /* Container.Delegate.DefaultImpls*/ {
62+
public static <R> R getValue(@org.jetbrains.annotations.NotNull() @org.jetbrains.annotations.NotNull() Container.Delegate<R>, @org.jetbrains.annotations.Nullable() @org.jetbrains.annotations.Nullable() java.lang.Object, @org.jetbrains.annotations.NotNull() @org.jetbrains.annotations.NotNull() kotlin.reflect.KProperty<?>);// <R> getValue(@org.jetbrains.annotations.NotNull() Container.Delegate<R>, @org.jetbrains.annotations.Nullable() java.lang.Object, @org.jetbrains.annotations.NotNull() kotlin.reflect.KProperty<?>)
63+
64+
public static <R> void setValue(@org.jetbrains.annotations.NotNull() @org.jetbrains.annotations.NotNull() Container.Delegate<R>, @org.jetbrains.annotations.Nullable() @org.jetbrains.annotations.Nullable() java.lang.Object, @org.jetbrains.annotations.NotNull() @org.jetbrains.annotations.NotNull() kotlin.reflect.KProperty<?>, R);// <R> setValue(@org.jetbrains.annotations.NotNull() Container.Delegate<R>, @org.jetbrains.annotations.Nullable() java.lang.Object, @org.jetbrains.annotations.NotNull() kotlin.reflect.KProperty<?>, R)
65+
}
6266
}
6367

6468
public static final class Derived /* Container.Derived*/ extends Container.Base {

compiler/testData/asJava/lightClasses/lightClassByPsi/DelegatedProperty.lib.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ public static abstract interface Delegate /* Container.Delegate*/<R> {
5858

5959
public abstract void setValue(@org.jetbrains.annotations.Nullable() java.lang.Object, @org.jetbrains.annotations.NotNull() kotlin.reflect.KProperty<?>, R);// setValue(java.lang.Object, kotlin.reflect.KProperty<?>, R)
6060

61-
class DefaultImpls ...
61+
public static final class DefaultImpls /* Container.Delegate.DefaultImpls*/ {
62+
@java.lang.Deprecated()
63+
public static <R> R getValue(@org.jetbrains.annotations.NotNull() Container.Delegate<R>, @org.jetbrains.annotations.Nullable() java.lang.Object, @org.jetbrains.annotations.NotNull() kotlin.reflect.KProperty<?>);// <R> getValue(Container.Delegate<R>, java.lang.Object, kotlin.reflect.KProperty<?>)
64+
65+
@java.lang.Deprecated()
66+
public static <R> void setValue(@org.jetbrains.annotations.NotNull() Container.Delegate<R>, @org.jetbrains.annotations.Nullable() java.lang.Object, @org.jetbrains.annotations.NotNull() kotlin.reflect.KProperty<?>, R);// <R> setValue(Container.Delegate<R>, java.lang.Object, kotlin.reflect.KProperty<?>, R)
67+
}
6268
}
6369

6470
public static final class Derived /* Container.Derived*/ extends Container.Base {

compiler/testData/asJava/lightClasses/lightClassByPsi/defaultMethodInKotlinWithSettingAll.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ public abstract interface KtInterface /* KtInterface*/ {
33

44
public abstract void withoutBody();// withoutBody()
55

6-
class DefaultImpls ...
6+
public static final class DefaultImpls /* KtInterface.DefaultImpls*/ {
7+
public static void defaultFun(@org.jetbrains.annotations.NotNull() @org.jetbrains.annotations.NotNull() KtInterface);// defaultFun(@org.jetbrains.annotations.NotNull() KtInterface)
8+
}
79
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
public abstract interface KtInterface /* KtInterface*/ {
2+
public abstract void defaultFun();// defaultFun()
3+
4+
public abstract void withoutBody();// withoutBody()
5+
6+
public static final class DefaultImpls /* KtInterface.DefaultImpls*/ {
7+
public static void defaultFun(@org.jetbrains.annotations.NotNull() KtInterface);// defaultFun(KtInterface)
8+
}
9+
}

compiler/testData/asJava/lightClasses/lightClassByPsi/defaultMethodInKotlinWithSettingAllCompatibility.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ public abstract interface KtInterface /* KtInterface*/ {
33

44
public abstract void withoutBody();// withoutBody()
55

6-
class DefaultImpls ...
6+
public static final class DefaultImpls /* KtInterface.DefaultImpls*/ {
7+
public static void defaultFun(@org.jetbrains.annotations.NotNull() @org.jetbrains.annotations.NotNull() KtInterface);// defaultFun(@org.jetbrains.annotations.NotNull() KtInterface)
8+
}
79
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
public abstract interface KtInterface /* KtInterface*/ {
2+
public abstract void defaultFun();// defaultFun()
3+
4+
public abstract void withoutBody();// withoutBody()
5+
6+
public static final class DefaultImpls /* KtInterface.DefaultImpls*/ {
7+
@java.lang.Deprecated()
8+
public static void defaultFun(@org.jetbrains.annotations.NotNull() KtInterface);// defaultFun(KtInterface)
9+
}
10+
}

compiler/testData/asJava/lightClasses/lightClassByPsi/deprecatedHiddenProperty_interface.lib.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ public abstract interface TestInterface /* test.pkg.TestInterface*/ {
77

88
public abstract void setPOld_deprecatedOnGetter(int);// setPOld_deprecatedOnGetter(int)
99

10-
class DefaultImpls ...
10+
public static final class DefaultImpls /* test.pkg.TestInterface.DefaultImpls*/ {
11+
}
1112
}

compiler/testData/asJava/lightClasses/lightClassByPsi/facades/valueClassInSignature.descriptors.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ public abstract interface SomeInterface /* SomeInterface*/ {
4949

5050
public abstract void setMemberPropInExtension(@org.jetbrains.annotations.NotNull() java.lang.String, int);// setMemberPropInExtension(java.lang.String, int)
5151

52-
class DefaultImpls ...
52+
public static final class DefaultImpls /* SomeInterface.DefaultImpls*/ {
53+
public static int getMemberPropInExtension(@org.jetbrains.annotations.NotNull() SomeInterface, @org.jetbrains.annotations.NotNull() java.lang.String);// getMemberPropInExtension(SomeInterface, java.lang.String)
54+
55+
public static void setMemberPropInExtension(@org.jetbrains.annotations.NotNull() SomeInterface, @org.jetbrains.annotations.NotNull() java.lang.String, int);// setMemberPropInExtension(SomeInterface, java.lang.String, int)
56+
}
5357
}
5458

5559
public final class ValueClassInSignatureKt /* ValueClassInSignatureKt*/ {

0 commit comments

Comments
 (0)