mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 00:21:35 +00:00
Use the same instances from class declaration instead Otherwise, primary constructor value parameter types when used in the class body are considered as different from types based on the class type parameters See the test genericConstructors.kt, before this commit "id" call was reported in inapplicable
10 lines
178 B
Kotlin
Vendored
10 lines
178 B
Kotlin
Vendored
// IGNORE_BACKEND_FIR: JVM_IR
|
|
class Box<T>(t: T) {
|
|
var value = t
|
|
}
|
|
|
|
fun box(): String {
|
|
val box: Box<Int> = Box<Int>(1)
|
|
return if (box.value == 1) "OK" else "fail"
|
|
}
|