[NI] Remove Nothing result type restriction in most cases

Make Nothing as result type not suitable only for if, when, try and ?: special functions.
This commit is contained in:
Pavel Kirpichenkov
2019-12-23 12:28:39 +03:00
parent ae1630f376
commit a9391c8dfb
21 changed files with 172 additions and 41 deletions
@@ -6,7 +6,7 @@ val <!OI;IMPLICIT_NOTHING_PROPERTY_TYPE!>test1<!> = when {
}
val test1a: () -> Boolean = when {
true -> <!NI;TYPE_MISMATCH!>{ { true } }<!>
true -> { { true } }
else -> TODO()
}
@@ -33,7 +33,7 @@ val <!OI;IMPLICIT_NOTHING_PROPERTY_TYPE!>test3<!> = when {
}
val test3a: () -> Boolean = when {
true -> <!NI;TYPE_MISMATCH!>{ { true } }<!>
true -> <!NI;TYPE_MISMATCH!>{ { true } }<!>
true -> { { true } }
true -> { { true } }
else -> TODO()
}