Files
kotlin-fork/compiler/testData/codegen/bytecodeListing/delegatedProperty/delegateMethodIsNonOverridable.txt
T
Alexander Udalov 04c5bbdcf8 JVM IR: change generation scheme of property $delegate methods
Generate $delegate method as instance method in
PropertyReferenceDelegationLowering, and remove dispatch receiver later
in MakePropertyDelegateMethodsStatic. The method needs to be static to
be non-overridable (see delegateMethodIsNonOverridable.kt), and public
to be accessible in reflection.

Otherwise we generated incorrect IR where a static function accessed an
instance field of the containing class, which failed in multiple places
including LocalDeclarationsLowering.

 #KT-48350 Fixed
2021-08-31 14:07:22 +02:00

66 lines
2.3 KiB
Plaintext
Vendored

@kotlin.Metadata
synthetic final class C$x$2$1 {
// source: 'delegateMethodIsNonOverridable.kt'
public final static field INSTANCE: kotlin.reflect.KProperty0
static method <clinit>(): void
method <init>(): void
public @org.jetbrains.annotations.Nullable method get(): java.lang.Object
}
@kotlin.Metadata
synthetic final class C$y$2 {
// source: 'delegateMethodIsNonOverridable.kt'
public final static field INSTANCE: kotlin.reflect.KProperty0
static method <clinit>(): void
method <init>(): void
public @org.jetbrains.annotations.Nullable method get(): java.lang.Object
}
@kotlin.Metadata
public class C {
// source: 'delegateMethodIsNonOverridable.kt'
private final @org.jetbrains.annotations.NotNull field x$delegate: kotlin.reflect.KProperty0
private final @org.jetbrains.annotations.NotNull field y$delegate: kotlin.reflect.KProperty0
public method <init>(): void
public method getX(): int
public method getY(): int
}
@kotlin.Metadata
synthetic final class D$x$2$1 {
// source: 'delegateMethodIsNonOverridable.kt'
public final static field INSTANCE: kotlin.reflect.KProperty0
static method <clinit>(): void
method <init>(): void
public @org.jetbrains.annotations.Nullable method get(): java.lang.Object
}
@kotlin.Metadata
synthetic final class D$y$2 {
// source: 'delegateMethodIsNonOverridable.kt'
public final static field INSTANCE: kotlin.reflect.KProperty0
static method <clinit>(): void
method <init>(): void
public @org.jetbrains.annotations.Nullable method get(): java.lang.Object
}
@kotlin.Metadata
public final class D {
// source: 'delegateMethodIsNonOverridable.kt'
private final @org.jetbrains.annotations.NotNull field x$delegate: kotlin.reflect.KProperty0
private final @org.jetbrains.annotations.NotNull field y$delegate: kotlin.reflect.KProperty0
public method <init>(): void
public method getX(): int
public method getY(): int
}
@kotlin.Metadata
public final class DelegateMethodIsNonOverridableKt {
// source: 'delegateMethodIsNonOverridable.kt'
private final static field a: int
private final static field b: int
static method <clinit>(): void
public final static method getA(): int
public final static method getB(): int
}