Don't generate delegation to jvm8 default methods

This commit is contained in:
Michael Bogdanov
2016-09-12 14:35:20 +03:00
parent c19e035f91
commit d9bb519b76
6 changed files with 25 additions and 35 deletions
+3 -4
View File
@@ -31,10 +31,9 @@ class TestClass2 : TestClass(), Test3 {
fun box(): String {
val test = TestClass2().test()
if (test != "Test2") return "fail 1: $test"
// TODO: enable this test once the required behavior is specified
// checkNoMethod(TestClass::class.java, "test")
// checkNoMethod(Test3::class.java, "test")
// checkNoMethod(TestClass2::class.java, "test")
checkNoMethod(TestClass::class.java, "test")
checkNoMethod(Test3::class.java, "test")
checkNoMethod(TestClass2::class.java, "test")
return "OK"
}
@@ -11,13 +11,11 @@ class TestClass : Test {
}
fun box(): String {
// TODO: enable this test once the required behavior is specified
// try {
// TestClass::class.java.getDeclaredMethod("test")
// }
// catch (e: NoSuchMethodException) {
// return "OK"
// }
// return "fail"
return "OK"
try {
TestClass::class.java.getDeclaredMethod("test")
}
catch (e: NoSuchMethodException) {
return "OK"
}
return "fail"
}
@@ -11,13 +11,11 @@ interface Test2 : Test {
}
fun box(): String {
// TODO: enable this test once the required behavior is specified
// try {
// Test2::class.java.getDeclaredMethod("test")
// }
// catch (e: NoSuchMethodException) {
// return "OK"
// }
// return "fail"
return "OK"
try {
Test2::class.java.getDeclaredMethod("test")
}
catch (e: NoSuchMethodException) {
return "OK"
}
return "fail"
}
@@ -16,13 +16,11 @@ interface Test3 : Test2 {
}
fun box(): String {
// TODO: enable this test once the required behavior is specified
// try {
// Test3::class.java.getDeclaredMethod("test")
// }
// catch (e: NoSuchMethodException) {
// return "OK"
// }
// return "fail"
return "OK"
try {
Test3::class.java.getDeclaredMethod("test")
}
catch (e: NoSuchMethodException) {
return "OK"
}
return "fail"
}
@@ -1,6 +1,3 @@
// WITH_REFLECT
// FULL_JDK
// FILE: 1.kt
interface Test {
fun test() {