Don't generate delegates on overriding jvm8 interfaces

This commit is contained in:
Mikhael Bogdanov
2016-05-19 14:19:02 +03:00
parent 01aa89b1ea
commit 331341bd4d
7 changed files with 154 additions and 3 deletions
@@ -0,0 +1,21 @@
// KOTLIN_CONFIGURATION_FLAGS: +JVM.JVM_8_TARGET
// WITH_RUNTIME
// FULL_JDK
interface Test {
fun test() {
}
}
class TestClass : Test {
}
fun box(): String {
try {
TestClass::class.java.getDeclaredMethod("test")
}
catch (e: NoSuchMethodException) {
return "OK"
}
return "fail"
}
@@ -0,0 +1,21 @@
// KOTLIN_CONFIGURATION_FLAGS: +JVM.JVM_8_TARGET
// WITH_RUNTIME
// FULL_JDK
interface Test {
fun test() {
}
}
interface Test2 : Test {
}
fun box(): String {
try {
Test2::class.java.getDeclaredMethod("test")
}
catch (e: NoSuchMethodException) {
return "OK"
}
return "fail"
}
@@ -0,0 +1,25 @@
// KOTLIN_CONFIGURATION_FLAGS: +JVM.JVM_8_TARGET
// WITH_RUNTIME
// FULL_JDK
interface Test {
fun test() {
}
}
interface Test2 : Test {
}
interface Test3 : Test2 {
}
fun box(): String {
try {
Test3::class.java.getDeclaredMethod("test")
}
catch (e: NoSuchMethodException) {
return "OK"
}
return "fail"
}
+14
View File
@@ -0,0 +1,14 @@
// KOTLIN_CONFIGURATION_FLAGS: +JVM.JVM_8_TARGET
interface Test {
fun test(): String {
return "OK"
}
}
class TestClass : Test {
}
fun box(): String {
return TestClass().test()
}