Files
kotlin-fork/compiler/testData/resolveConstructorDelegationCalls/generics3.txt
T
Denis Zharkov 36665fe3b8 Change logic of constructor delegation call resolution
- If class has type arguments (A<T1,..>) then
  resolve it's delegation call to `this` as for expression A<T1, ..>()
  like type arguments are explicitly specified.

- Same logic works for `super` delegation calls.

- It could be just enough to substitute all candidates before resolve
  but diagnostic messages looks more correct when substitution is
  performed within CandidateResolver.performResolutionForCandidateCall
  because it works the same way as when resolving A<T1, ..>().

 #KT-6992 Fixed
 #KT-6993 Fixed
 #KT-6994 Fixed
2015-03-17 23:18:35 +03:00

21 lines
464 B
Plaintext
Vendored

open class B<R1, R2>(x: R1, y: R2)
class A<T1, T2> : B<T1, Int> {
<caret>constructor(x: T1, y: Int): super(x, y) {}
}
Resolved call:
Candidate descriptor: constructor B<R1, R2>(x: R1, y: R2) defined in B
Resulting descriptor: constructor B<R1, R2>(x: T1, y: Int) 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 : Int = y