Files
kotlin-fork/compiler/testData/codegen/box/properties/genericWithSameName.kt
T
Kirill Rakhman 951b299268 [FIR] Rewrite redeclaration checks
#KT-60124 Fixed
#KT-60573 Fixed
2023-07-27 08:06:20 +00:00

18 lines
284 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM, JVM_IR
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
}