mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
16 lines
263 B
Kotlin
Vendored
16 lines
263 B
Kotlin
Vendored
class Coll {
|
|
operator fun iterator(): It = It()
|
|
}
|
|
|
|
class It {
|
|
operator fun next() = 1
|
|
operator fun hasNext() = false
|
|
}
|
|
|
|
fun test(c: Coll?) {
|
|
for (x in <!ITERATOR_ON_NULLABLE!>c<!>) {}
|
|
|
|
if (c != null) {
|
|
for(x in <!DEBUG_INFO_SMARTCAST!>c<!>) {}
|
|
}
|
|
} |