[NI] Turn off KnownTypeParameterSubstitutor for NI

The main consequence of it is that TYPE_MISMATCH range for control
structures became wider.

Also, for extra safety, don't change behaviour of OI.
This commit is contained in:
Dmitry Savvinov
2017-12-07 13:18:24 +03:00
parent 4ed6928e6b
commit 33f9576dd1
15 changed files with 53 additions and 49 deletions
+3 -3
View File
@@ -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 = <!NO_ELSE_IN_WHEN!>when<!>(a) {
fun illegalWhenBody(a: Any): Int = <!NI;TYPE_MISMATCH!><!NO_ELSE_IN_WHEN!>when<!>(a) {
is Int -> <!DEBUG_INFO_SMARTCAST!>a<!>
is String -> <!TYPE_MISMATCH!>a<!>
}
is String -> <!OI;TYPE_MISMATCH!>a<!>
}<!>
fun illegalWhenBlock(a: Any): Int {
when(a) {
is Int -> return <!DEBUG_INFO_SMARTCAST!>a<!>