JVM_IR KT-47326 downcast field receiver on JvmField lowering
This commit is contained in:
committed by
TeamCityServer
parent
ebc4e10684
commit
c19792e7c5
@@ -0,0 +1,17 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
|
||||
interface A { val x: Int }
|
||||
|
||||
class B(@JvmField override val x: Int): A
|
||||
|
||||
class C<D: A>(@JvmField val d: D)
|
||||
|
||||
class E(c: C<B>) { val ax = c.d.x }
|
||||
|
||||
fun box(): String {
|
||||
val e = E(C(B(42)))
|
||||
if (e.ax != 42)
|
||||
return "Failed: ${e.ax}"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user