JVM_IR KT-48295 don't upcast field receiver with super qualifier
This commit is contained in:
committed by
TeamCityServer
parent
7038b02933
commit
a3bb9dde45
@@ -0,0 +1,21 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
|
||||
// FILE: a.kt
|
||||
|
||||
package a
|
||||
|
||||
open class A {
|
||||
@JvmField protected var result = "Fail"
|
||||
}
|
||||
|
||||
// FILE: b.kt
|
||||
|
||||
class B : a.A() {
|
||||
fun test(): String {
|
||||
super.result = "OK"
|
||||
return super.result
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String = B().test()
|
||||
@@ -0,0 +1,23 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
|
||||
// FILE: a.kt
|
||||
|
||||
package a
|
||||
|
||||
open class A {
|
||||
@JvmField protected var result = "Fail"
|
||||
}
|
||||
|
||||
open class AA : A()
|
||||
|
||||
// FILE: b.kt
|
||||
|
||||
class B : a.AA() {
|
||||
fun test(): String {
|
||||
super.result = "OK"
|
||||
return super.result
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String = B().test()
|
||||
Reference in New Issue
Block a user