Support bridges in interfaces. Fix for KT-12416: Missed bridges in js backend

#KT-12416 Fixed
This commit is contained in:
Mikhael Bogdanov
2016-05-19 15:55:18 +03:00
parent c778af518b
commit bb59638039
12 changed files with 235 additions and 22 deletions

View File

@@ -0,0 +1,21 @@
// KOTLIN_CONFIGURATION_FLAGS: +JVM.JVM_8_TARGET
interface Test<T> {
fun test(p: T): T {
return p
}
}
class TestClass : Test<String> {
override fun test(p: String): String {
return p + "K"
}
}
fun <T> execute(t: Test<T>, p: T): T {
return t.test(p)
}
fun box(): String {
return execute(TestClass(), "O")
}

View File

@@ -0,0 +1,24 @@
// KOTLIN_CONFIGURATION_FLAGS: +JVM.JVM_8_TARGET
interface Test<T> {
fun test(p: T): T {
return p
}
}
interface Test2: Test<String> {
override fun test(p: String): String {
return p + "K"
}
}
class TestClass : Test2 {
}
fun <T> execute(t: Test<T>, p: T): T {
return t.test(p)
}
fun box(): String {
return execute(TestClass(), "O")
}