Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/inference/unneededUnstableSmartcast.kt
T
2021-06-10 16:01:13 +03:00

9 lines
244 B
Kotlin
Vendored

// FIR_IDENTICAL
class Test<E>(var c: Collection<E>) {
fun test() {
if (c is List<*>) {
c.size // smartcast is unstable, but `size` is also available from `Collection`, so there should not be any error
}
}
}