Fix for KT-14966: Regression: VerifyError on access super implementation from delegate
#KT-14966 Fixed
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// FILE: IBase.java
|
||||
|
||||
interface IBase {
|
||||
default String bar() {
|
||||
return "OK";
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Kotlin.kt
|
||||
open class Base {
|
||||
fun foo() = "OK"
|
||||
}
|
||||
|
||||
class C : Base(), IBase {
|
||||
val lambda1 = {
|
||||
super.foo()
|
||||
}
|
||||
|
||||
val lambda2 = {
|
||||
super.bar()
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if (C().lambda1() != "OK") return "fail 1"
|
||||
|
||||
return C().lambda2()
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// JVM_TARGET: 1.8
|
||||
// FILE: IBase.java
|
||||
|
||||
interface IBase {
|
||||
default String bar() {
|
||||
return "OK";
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Kotlin.kt
|
||||
open class Base {
|
||||
fun foo() = "OK"
|
||||
}
|
||||
|
||||
class C : Base(), IBase {
|
||||
val lambda1 = {
|
||||
super.foo()
|
||||
}
|
||||
|
||||
val lambda2 = {
|
||||
super.bar()
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if (C().lambda1() != "OK") return "fail 1"
|
||||
|
||||
return C().lambda2()
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// JVM_TARGET: 1.8
|
||||
// KOTLIN_CONFIGURATION_FLAGS: +JVM.JVM8_TARGET_WITH_DEFAULTS
|
||||
|
||||
interface IBase {
|
||||
fun bar() = "OK"
|
||||
}
|
||||
|
||||
open class Base {
|
||||
fun foo() = "OK"
|
||||
}
|
||||
|
||||
class C : Base(), IBase {
|
||||
val lambda1 = {
|
||||
super.foo()
|
||||
}
|
||||
|
||||
val lambda2 = {
|
||||
super.bar()
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if (C().lambda1() != "OK") return "fail 1"
|
||||
|
||||
return C().lambda2()
|
||||
}
|
||||
Reference in New Issue
Block a user