Files
kotlin-fork/compiler/testData/codegen/box/properties/genericWithSameName.kt
T
Roman Artemev e57d34dd9e Make fix test:
- [JS IR] Unmute fixed tests
 - [IrText] Update testdata
 - [WASM] Temporary turn wasm test off
 - [FirText] Temporary turn fit text tests off
 - [JVM IR] Turn off klib jvm test
 - [IR] Add new test
2020-02-14 18:22:17 +03:00

18 lines
313 B
Kotlin
Vendored

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