Files
kotlin-fork/compiler/testData/diagnostics/tests/operatorsOverloading/kt45503_1.kt
T
2021-03-30 18:06:06 +03:00

16 lines
302 B
Kotlin
Vendored

// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER
// WITH_RUNTIME
// SKIP_TXT
class A<T>
class B<T>(val x: MutableList<T>) : MutableList<T> by x
class C {
operator fun <T> get(k: A<T>): T = TODO()
operator fun <T> set(k: A<T>, v: T): Unit = TODO()
}
fun foo() {
C()[A<B<Int>>()] += 2
}