Fix for KT-14966: Regression: VerifyError on access super implementation from delegate

#KT-14966 Fixed
This commit is contained in:
Mikhael Bogdanov
2017-01-24 17:06:32 +01:00
parent 11578c602e
commit fc4be17623
8 changed files with 123 additions and 6 deletions
@@ -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()
}