JVM: no nullability annotations on private and synthetic fields

This commit is contained in:
Dmitry Petrov
2020-06-25 13:06:51 +03:00
parent cbd8b58d5c
commit 3f266aafb4
35 changed files with 67 additions and 72 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
// WITH_RUNTIME
class Example {
@@ -1,7 +1,7 @@
@kotlin.Metadata
public final class Example {
private field prop2: int
private synthetic final @org.jetbrains.annotations.NotNull field prop: java.lang.String
private synthetic final field prop: java.lang.String
private field useSite2: int
private synthetic final field useSite: int
public method <init>(): void
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
@Target(AnnotationTarget.FIELD)
annotation class Anno
@@ -6,7 +6,7 @@ public annotation class Anno
@kotlin.Metadata
public final class C {
private final @Anno @org.jetbrains.annotations.NotNull field json: java.lang.String
private final @Anno field json: java.lang.String
private final field x: int
public method <init>(p0: int): void
public final method component1(): int
@@ -2,7 +2,7 @@
public final class LocalClassWithCapturedParamsKt$localCaptured$A {
synthetic final field $z: int
private final field x: int
private final @org.jetbrains.annotations.NotNull field z: java.lang.String
private final field z: java.lang.String
inner class LocalClassWithCapturedParamsKt$localCaptured$A
public method <init>(p0: int, @Simple @org.jetbrains.annotations.NotNull p1: java.lang.String): void
public final method getX(): int
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
class A {
val a = ""
fun b() = ""
@@ -1,6 +1,6 @@
@kotlin.Metadata
public final class A {
private final @org.jetbrains.annotations.NotNull field a: java.lang.String
private final field a: java.lang.String
public method <init>(): void
public final @org.jetbrains.annotations.NotNull method b(): java.lang.String
public final @org.jetbrains.annotations.NotNull method getA(): java.lang.String
@@ -20,7 +20,7 @@ public final class NullabilityInExpansionKt {
@kotlin.Metadata
public final class Q1 {
private final @org.jetbrains.annotations.Nullable field x: java.lang.Integer
private final field x: java.lang.Integer
private synthetic method <init>(@org.jetbrains.annotations.Nullable p0: java.lang.Integer): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.Nullable p0: java.lang.Integer): Q1
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.Nullable p0: java.lang.Integer): java.lang.Integer
@@ -37,7 +37,7 @@ public final class Q1 {
@kotlin.Metadata
public final class Q2 {
private final @org.jetbrains.annotations.NotNull field z: java.lang.Integer
private final field z: java.lang.Integer
private synthetic method <init>(@org.jetbrains.annotations.NotNull p0: java.lang.Integer): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.NotNull p0: java.lang.Integer): Q2
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.Integer): java.lang.Integer
@@ -54,7 +54,7 @@ public final class Q2 {
@kotlin.Metadata
public final class QN {
private final @org.jetbrains.annotations.Nullable field z: Q1
private final field z: Q1
private synthetic method <init>(@org.jetbrains.annotations.Nullable p0: Q1): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.Nullable p0: Q1): QN
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.Nullable p0: Q1): Q1
@@ -71,7 +71,7 @@ public final class QN {
@kotlin.Metadata
public final class S1 {
private final @org.jetbrains.annotations.NotNull field x: java.lang.String
private final field x: java.lang.String
private synthetic method <init>(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): S1
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
@@ -88,7 +88,7 @@ public final class S1 {
@kotlin.Metadata
public final class S2 {
private final @org.jetbrains.annotations.NotNull field z: java.lang.String
private final field z: java.lang.String
private synthetic method <init>(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): S2
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
@@ -105,7 +105,7 @@ public final class S2 {
@kotlin.Metadata
public final class SN {
private final @org.jetbrains.annotations.Nullable field z: java.lang.String
private final field z: java.lang.String
private synthetic method <init>(@org.jetbrains.annotations.Nullable p0: java.lang.String): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.Nullable p0: java.lang.String): SN
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.Nullable p0: java.lang.String): java.lang.String
@@ -122,7 +122,7 @@ public final class SN {
@kotlin.Metadata
public final class SN2 {
private final @org.jetbrains.annotations.NotNull field z: java.lang.String
private final field z: java.lang.String
private synthetic method <init>(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): SN2
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
@@ -139,7 +139,7 @@ public final class SN2 {
@kotlin.Metadata
public final class W1 {
private final @org.jetbrains.annotations.Nullable field x: java.lang.String
private final field x: java.lang.String
private synthetic method <init>(@org.jetbrains.annotations.Nullable p0: java.lang.String): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.Nullable p0: java.lang.String): W1
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.Nullable p0: java.lang.String): java.lang.String
@@ -156,7 +156,7 @@ public final class W1 {
@kotlin.Metadata
public final class W2 {
private final @org.jetbrains.annotations.NotNull field z: java.lang.String
private final field z: java.lang.String
private synthetic method <init>(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): W2
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
@@ -173,7 +173,7 @@ public final class W2 {
@kotlin.Metadata
public final class WN {
private final @org.jetbrains.annotations.Nullable field z: W1
private final field z: W1
private synthetic method <init>(@org.jetbrains.annotations.Nullable p0: W1): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.Nullable p0: W1): WN
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.Nullable p0: W1): W1
@@ -224,7 +224,7 @@ public final class Z2 {
@kotlin.Metadata
public final class ZN {
private final @org.jetbrains.annotations.Nullable field z: Z1
private final field z: Z1
private synthetic method <init>(@org.jetbrains.annotations.Nullable p0: Z1): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.Nullable p0: Z1): ZN
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.Nullable p0: Z1): Z1
@@ -241,7 +241,7 @@ public final class ZN {
@kotlin.Metadata
public final class ZN2 {
private final @org.jetbrains.annotations.NotNull field z: Z1
private final field z: Z1
private synthetic method <init>(@org.jetbrains.annotations.NotNull p0: Z1): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.NotNull p0: Z1): ZN2
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: Z1): Z1
@@ -40,10 +40,10 @@ synthetic final class NoReceiverInCallableReferenceClassesKt$aFoo$1 {
@kotlin.Metadata
public final class NoReceiverInCallableReferenceClassesKt {
private final static @org.jetbrains.annotations.NotNull field A_bar: kotlin.reflect.KProperty1
private final static @org.jetbrains.annotations.NotNull field A_foo: kotlin.reflect.KFunction
private final static @org.jetbrains.annotations.NotNull field aBar: kotlin.reflect.KProperty0
private final static @org.jetbrains.annotations.NotNull field aFoo: kotlin.reflect.KFunction
private final static field A_bar: kotlin.reflect.KProperty1
private final static field A_foo: kotlin.reflect.KFunction
private final static field aBar: kotlin.reflect.KProperty0
private final static field aFoo: kotlin.reflect.KFunction
inner class NoReceiverInCallableReferenceClassesKt$A_foo$1
inner class NoReceiverInCallableReferenceClassesKt$aFoo$1
static method <clinit>(): void
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
open class Test {
var publicProperty: String = ""
private set
@@ -1,8 +1,8 @@
@kotlin.Metadata
public class Test {
private @org.jetbrains.annotations.NotNull field internalProperty: java.lang.String
private @org.jetbrains.annotations.NotNull field protectedProperty: java.lang.String
private @org.jetbrains.annotations.NotNull field publicProperty: java.lang.String
private field internalProperty: java.lang.String
private field protectedProperty: java.lang.String
private field publicProperty: java.lang.String
public method <init>(): void
public final @org.jetbrains.annotations.NotNull method getInternalProperty$test_module(): java.lang.String
protected final @org.jetbrains.annotations.NotNull method getProtectedProperty(): java.lang.String