Relax rules about inferring to Nothing for special calls
#KT-37388 Fixed #KT-38427 Fixed #KT-39953 Fixed #KT-38899 Fixed
This commit is contained in:
+3
-3
@@ -142,10 +142,10 @@ fun getStringLength(obj : Any) : Char? {
|
||||
}
|
||||
|
||||
fun toInt(i: Int?): Int = if (i != null) <!DEBUG_INFO_SMARTCAST!>i<!> else 0
|
||||
fun illegalWhenBody(a: Any): Int = <!NI;TYPE_MISMATCH!><!NO_ELSE_IN_WHEN!>when<!>(a) {
|
||||
fun illegalWhenBody(a: Any): Int = <!NO_ELSE_IN_WHEN!>when<!>(a) {
|
||||
is Int -> <!DEBUG_INFO_SMARTCAST!>a<!>
|
||||
is String -> <!OI;TYPE_MISMATCH!>a<!>
|
||||
}<!>
|
||||
is String -> <!TYPE_MISMATCH!>a<!>
|
||||
}
|
||||
fun illegalWhenBlock(a: Any): Int {
|
||||
when(a) {
|
||||
is Int -> return <!DEBUG_INFO_SMARTCAST!>a<!>
|
||||
|
||||
Reference in New Issue
Block a user