JVM: Generate object and companion object INSTANCE fields as @NotNull
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
public final class A {
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public static final A.Companion Companion;
|
||||
|
||||
public A() { /* compiled code */ }
|
||||
@@ -7,6 +8,7 @@ public final class A {
|
||||
public static final void f() { /* compiled code */ }
|
||||
|
||||
public static final class B {
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public static final A.B INSTANCE;
|
||||
|
||||
@kotlin.jvm.JvmStatic
|
||||
|
||||
@@ -5,12 +5,14 @@ public final class A {
|
||||
public B() { /* compiled code */ }
|
||||
|
||||
public static final class I {
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public static final A.B.I INSTANCE;
|
||||
|
||||
private I() { /* compiled code */ }
|
||||
}
|
||||
|
||||
public static final class II {
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public static final A.B.II INSTANCE;
|
||||
|
||||
private II() { /* compiled code */ }
|
||||
@@ -18,16 +20,19 @@ public final class A {
|
||||
}
|
||||
|
||||
public static final class C {
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public static final A.C INSTANCE;
|
||||
|
||||
private C() { /* compiled code */ }
|
||||
|
||||
public static final class D {
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public static final A.C.D INSTANCE;
|
||||
|
||||
private D() { /* compiled code */ }
|
||||
|
||||
public static final class G {
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public static final A.C.D.G INSTANCE;
|
||||
|
||||
private G() { /* compiled code */ }
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
public interface TraitClassObjectField {
|
||||
@org.jetbrains.annotations.NotNull
|
||||
TraitClassObjectField.Companion Companion;
|
||||
@org.jetbrains.annotations.Nullable
|
||||
java.lang.String x = "";
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
public final class A {
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public static final A.Companion Companion;
|
||||
|
||||
public A() { /* compiled code */ }
|
||||
|
||||
+1
@@ -2,6 +2,7 @@ public final class ClassObjectField {
|
||||
@org.jetbrains.annotations.Nullable
|
||||
private static final java.lang.String x;
|
||||
private static final java.lang.String y;
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public static final ClassObjectField.Companion Companion;
|
||||
|
||||
public ClassObjectField() { /* compiled code */ }
|
||||
|
||||
@@ -5,6 +5,7 @@ public final class A {
|
||||
public static final int cc = 1;
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public static final java.lang.String cv = "A";
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public static final pack.A INSTANCE;
|
||||
|
||||
public final int getC() { /* compiled code */ }
|
||||
|
||||
@@ -2,6 +2,7 @@ public final class C {
|
||||
@kotlin.jvm.JvmField
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public static final java.lang.String foo;
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public static final C.Companion Companion;
|
||||
|
||||
public C() { /* compiled code */ }
|
||||
|
||||
Reference in New Issue
Block a user