Fix unresolved reference to catch parameter from lambda expression
#KT-41140 Fixed
This commit is contained in:
+12
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user