7da271bab8
This leads to type ref referring to generic type variables being serialized correctly. When the type variable is declared on the member itself, it's written to typeParameterName, otherwise it's written to typeParameter. This is required for deserialization to work correctly. #KT-63227 Fixed
22 lines
388 B
Kotlin
Vendored
22 lines
388 B
Kotlin
Vendored
// !LANGUAGE: +ContextReceivers
|
|
// MODULE: m1
|
|
// FILE: Base.kt
|
|
abstract class Base<T> {
|
|
context(T)
|
|
abstract val String.foo: Int?
|
|
|
|
context(T)
|
|
abstract fun foo(): Int?
|
|
}
|
|
|
|
// MODULE: box(m1)
|
|
// FILE: box.kt
|
|
class Child : Base<String>() {
|
|
context(String)
|
|
override val String.foo: Int? get() = 1
|
|
|
|
context(String)
|
|
override fun foo(): Int? = 1
|
|
}
|
|
|
|
fun box() = "OK" |