34e6649d31
Before this commit, nullable argument could match not null parameter. Now we require also correct nullability that breaks some cases
21 lines
382 B
Kotlin
Vendored
21 lines
382 B
Kotlin
Vendored
// !CHECK_TYPE
|
|
|
|
fun simpleDoWhile(x: Int?, y0: Int) {
|
|
var y = y0
|
|
do {
|
|
checkSubtype<Int?>(x)
|
|
y++
|
|
} while (x!! == y)
|
|
checkSubtype<Int>(x)
|
|
}
|
|
|
|
fun doWhileWithBreak(x: Int?, y0: Int) {
|
|
var y = y0
|
|
do {
|
|
checkSubtype<Int?>(x)
|
|
y++
|
|
if (y > 0) break
|
|
} while (x!! == y)
|
|
<!INAPPLICABLE_CANDIDATE!>checkSubtype<!><Int>(x)
|
|
}
|