[NI] Avoid constraints from expected type for effectively empty system
Expression will be checked against expected type later. Theoretically, this is not very good, but it aligns with the old inference, plus it helps avoiding multiple type mismatch diagnostics.
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@ package kt1293
|
||||
|
||||
fun main() {
|
||||
val intArray = arrayOfNulls<Int>(10)
|
||||
val <!UNUSED_VARIABLE!>i<!> : Int = <!NI;TYPE_MISMATCH, TYPE_MISMATCH!>intArray[0]<!>
|
||||
val <!UNUSED_VARIABLE!>i<!> : Int = <!TYPE_MISMATCH!>intArray[0]<!>
|
||||
requiresInt(<!TYPE_MISMATCH!>intArray[0]<!>)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user