2ecba6ac39
This directive anyway does not make test run twice with OI, and with NI It only once run the test with specific settings (// LANGUAGE) and ignores irrelevant (OI or NI tags)
12 lines
285 B
Kotlin
Vendored
12 lines
285 B
Kotlin
Vendored
//KT-1293 Compiler doesn't show error when element of Array<Int?> is assigned to Int
|
|
|
|
package kt1293
|
|
|
|
fun main() {
|
|
val intArray = arrayOfNulls<Int>(10)
|
|
val i : Int = <!TYPE_MISMATCH!>intArray[0]<!>
|
|
requiresInt(<!TYPE_MISMATCH!>intArray[0]<!>)
|
|
}
|
|
|
|
fun requiresInt(i: Int) {}
|