Files
kotlin-fork/compiler/testData/resolveConstructorDelegationCalls/generics4.txt
T
Denis Zharkov 6542d091ee Support generic constructors defined in Java
#KT-10686 Fixed
 #KT-10410 Fixed
2016-01-28 08:35:18 +03:00

26 lines
575 B
Plaintext
Vendored

open class B<X, Y : X> {
constructor(x: X, y: Y) {}
constructor(x: X, s: String) {}
constructor(y: Y, i: Int) : this(y, "") {}
}
class A<T1, T2 : T1> : B<T1, T2> {
<caret>constructor(x: T1, y: T2): super(x, y) {}
}
Resolved call:
Candidate descriptor: constructor B<X, Y : X>(x: X, y: Y) defined in B
Resulting descriptor: constructor B<X, Y : T1>(x: T1, y: T2) defined in B
Explicit receiver kind = NO_EXPLICIT_RECEIVER
Dispatch receiver = NO_RECEIVER
Extension receiver = NO_RECEIVER
Value arguments mapping:
SUCCESS x : T1 = x
SUCCESS y : T2 = y