Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/regressions/kt3496.fir.kt
T

9 lines
263 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_VARIABLE
// KT-3496 Type inference bug on y[""]
class B<T> {
fun <S> x (y: B<Iterable<S>>) {
val z: S = y[""] // does not work with [], but works with .get()
}
operator fun <S> get(s : String): S = throw Exception()
}