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
This commit is contained in:
Denis Zharkov
2015-03-15 21:40:01 +03:00
parent e37cf6b6a1
commit 36665fe3b8
31 changed files with 392 additions and 20 deletions
@@ -0,0 +1,9 @@
package
internal final class A</*0*/ T1, /*1*/ T2> {
public constructor A</*0*/ T1, /*1*/ T2>(/*0*/ block: (T1) -> T2)
public constructor A</*0*/ T1, /*1*/ T2>(/*0*/ x: T2)
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}