Files
kotlin-fork/compiler/testData/codegen/box/properties/genericWithSameName.kt
T
2021-11-20 03:37:31 +03:00

19 lines
349 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM, JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: not supported in JVM
package foo
class C<T>(val pp: T)
val <T: Any?> C<T>.p: String get() = pp?.toString() ?: "O"
val <T: Any> C<T>.p: String get() = pp.toString()
fun box(): String {
val c1 = C<String?>(null)
val c2 = C<String>("K")
return c1.p + c2.p
}