FIR: expect nullable type for elvis LHS
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
fun <T> f(): T? = "OK" as? T
|
||||
|
||||
fun g(): Nothing = throw RuntimeException("fail")
|
||||
|
||||
fun <T : Any> h(): T = run { f() } ?: run { g() }
|
||||
|
||||
fun box(): String = h<String>()
|
||||
Reference in New Issue
Block a user