c7435ba760
We are going to deprecate `WITH_RUNTIME` directive. The main reason behind this change is that `WITH_STDLIB` directive better describes its meaning, specifically it will add kotlin stdlib to test's classpath.
24 lines
414 B
Kotlin
Vendored
24 lines
414 B
Kotlin
Vendored
// !LANGUAGE: -ProhibitJvmFieldOnOverrideFromInterfaceInPrimaryConstructor
|
|
// TARGET_BACKEND: JVM
|
|
// WITH_STDLIB
|
|
|
|
interface A { var x: Int }
|
|
|
|
class B(@JvmField override var x: Int): A
|
|
|
|
class C<D: A>(@JvmField val d: D)
|
|
|
|
class E(c: C<B>) {
|
|
init {
|
|
c.d.x = 42
|
|
}
|
|
val ax = c.d.x
|
|
}
|
|
|
|
fun box(): String {
|
|
val e = E(C(B(1234)))
|
|
if (e.ax != 42)
|
|
return "Failed: ${e.ax}"
|
|
return "OK"
|
|
}
|