b8984d154b
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
17 lines
207 B
Kotlin
Vendored
17 lines
207 B
Kotlin
Vendored
class A<T>(t: T) {
|
|
fun foo(x: T) {}
|
|
}
|
|
|
|
abstract class B<E>(e: E) {
|
|
val myE: E = id(e)
|
|
val a = A(e)
|
|
|
|
fun id(e: E): E = e
|
|
}
|
|
|
|
class C : B<String>("") {
|
|
fun bar() {
|
|
a.foo("")
|
|
}
|
|
}
|