JVM IR: Mark lateinit fields as NotNull

This is needed for compatibility with the JVM backend.
This commit is contained in:
Steven Schäfer
2020-06-02 12:02:29 +02:00
committed by Alexander Udalov
parent 52b29b53bc
commit 3291cf7a6e
5 changed files with 32 additions and 6 deletions
@@ -0,0 +1,5 @@
// Test to ensure that we mark the backing field of a lateinit property
// as NotNull, even though the field is nullable in the JVM IR backend.
class A {
lateinit var x: A
}
@@ -0,0 +1,7 @@
@kotlin.Metadata
public final class A {
public @org.jetbrains.annotations.NotNull field x: A
public method <init>(): void
public final @org.jetbrains.annotations.NotNull method getX(): A
public final method setX(@org.jetbrains.annotations.NotNull p0: A): void
}