[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
@@ -1,4 +1,5 @@
// !DIAGNOSTICS: -USELESS_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE
// !WITH_NEW_INFERENCE
// FILE: j/Base.java
package j;
@@ -38,7 +39,7 @@ fun <T> listOf2(x1: T, x2: T): List<T> = null!!
fun <T> arrayOf2(x1: T, x2: T): Array<T> = null!!
fun test() {
val test1: Base = if (true) d1 else d2
val test1: Base = <!NI;INACCESSIBLE_TYPE!>if (true) d1 else d2<!>
val test2 = <!INACCESSIBLE_TYPE!>if (true) d1 else d2<!>
@@ -47,10 +48,10 @@ fun test() {
else -> d2
}<!>
val test4: Base = when {
val test4: Base = <!NI;INACCESSIBLE_TYPE!>when {
true -> d1
else -> d2
}
}<!>
val test5 = <!INACCESSIBLE_TYPE!>select(d1, d2)<!>