Fix unresolved reference to catch parameter from lambda expression

#KT-41140 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2020-08-18 10:52:45 +03:00
parent f2fba8a469
commit 6ed13ef1b6
9 changed files with 51 additions and 1 deletions
@@ -0,0 +1,12 @@
fun test(): () -> Throwable {
return try {
TODO()
} catch (e: Throwable) {
{ -> e }
}
}
fun box(): String {
val exception = test()()
return if (exception is NotImplementedError) "OK" else "fail: $exception"
}