JVM_IR KT-47073 use type parameter upper bound for default value

This commit is contained in:
Dmitry Petrov
2021-06-04 15:11:39 +03:00
committed by TeamCityServer
parent e4b723fe4a
commit 7fd033adae
11 changed files with 113 additions and 0 deletions
@@ -0,0 +1,9 @@
// IGNORE_BACKEND: JS
class Test<T: Char>(val k: T) {
fun test(x: T = k): String {
return "O$x"
}
}
fun box() = Test('K').test()
@@ -0,0 +1,12 @@
// IGNORE_BACKEND: JS
class Test<T: Char>(val k: T) {
fun test(): String {
fun nested(x: T = k): String {
return "O$x"
}
return nested()
}
}
fun box() = Test('K').test()