Added tests for lambda's returning Nothing (currently do not work)
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
Resolve target: value-parameter val p: kotlin.String? smart-cast to kotlin.String
|
||||
----------------------------------------------
|
||||
fun foo(p: String?) {
|
||||
val lambda = { () -> throw Exception() }
|
||||
if (p == null) { lambda() }
|
||||
|
||||
<caret>p.size
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
fun foo(p: String?) {
|
||||
val lambda = { () -> throw Exception() }
|
||||
if (p == null) {
|
||||
lambda()
|
||||
}
|
||||
|
||||
<caret>p.size
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
Resolve target: value-parameter val p: kotlin.String? smart-cast to kotlin.String
|
||||
----------------------------------------------
|
||||
fun foo(p: String?, errorHandler: () -> Nothing) {
|
||||
if (p == null) {
|
||||
errorHandler()
|
||||
}
|
||||
|
||||
<caret>p.size
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun foo(p: String?, errorHandler: () -> Nothing) {
|
||||
if (p == null) {
|
||||
errorHandler()
|
||||
}
|
||||
|
||||
<caret>p.size
|
||||
}
|
||||
Reference in New Issue
Block a user