JVM_IR KT-47073 use type parameter upper bound for default value
This commit is contained in:
committed by
TeamCityServer
parent
e4b723fe4a
commit
7fd033adae
@@ -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()
|
||||
Reference in New Issue
Block a user