Add test for Obsolete issues

#KT-15956 Obsolete
 #KT-15751 Obsolete
 #KT-16417 Obsolete
 #KT-21787 Obsolete
This commit is contained in:
Mikhael Bogdanov
2019-01-08 10:00:08 +01:00
parent 6a19e45e27
commit 9a059809bf
17 changed files with 262 additions and 0 deletions
@@ -0,0 +1,32 @@
// FILE: 1.kt
// NO_CHECK_LAMBDA_INLINING
class A {
val foo = fun(call: () -> Unit) =
ext {
fun send() {
call()
}
bar {
send()
}
}
fun bar(body: () -> Unit) {
body()
}
inline fun A.ext(init: X.() -> Unit) {
return X().init()
}
class X
}
// FILE: 2.kt
fun box(): String {
var result = "fail"
A().foo { result = "OK" }
return result
}