Files
kotlin-fork/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/delegationBy_old.kt
T
Dmitry Petrov 866f188120 Report JVM signature clashes from JVM_IR
Also:

* Do not rename public ABI fields
This includes backing fields for const, lateinit, @JvmField properties,
and instance fields for objects.

* FAKE_OVERRIDE declarations for static members of parent Java classes
Required to report cases when a Kotlin function accidentally overrides
Java class member.
2020-02-13 11:35:48 +03:00

15 lines
465 B
Kotlin
Vendored

// TARGET_BACKEND: JVM_OLD
interface Foo
class <!CONFLICTING_JVM_DECLARATIONS!>Bar(f: Foo)<!> : Foo by f {
// Backing field is renamed to `$$delegate_0$1` in JVM_IR
<!CONFLICTING_JVM_DECLARATIONS!>val `$$delegate_0`: Foo?<!> = null
}
class <!CONFLICTING_JVM_DECLARATIONS!>Bar2(f: Foo)<!> :
// Backing field for delegate is renamed to `$$delegate_0$1` in JVM_IR
Foo by f {
<!CONFLICTING_JVM_DECLARATIONS!>lateinit var `$$delegate_0`: Foo<!>
}