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:
@@ -10647,6 +10647,18 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("generics2.kt")
|
||||
public void testGenerics2() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/generics2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("generics3.kt")
|
||||
public void testGenerics3() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/generics3.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("headerSupertypeInitialization.kt")
|
||||
public void testHeaderSupertypeInitialization() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerSupertypeInitialization.kt");
|
||||
@@ -10659,6 +10671,30 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt6992.kt")
|
||||
public void testKt6992() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/kt6992.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt6993.kt")
|
||||
public void testKt6993() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/kt6993.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt6994.kt")
|
||||
public void testKt6994() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/kt6994.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaInDelegation.kt")
|
||||
public void testLambdaInDelegation() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/lambdaInDelegation.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("memberAccessBeforeSuperCall.kt")
|
||||
public void testMemberAccessBeforeSuperCall() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/memberAccessBeforeSuperCall.kt");
|
||||
|
||||
Reference in New Issue
Block a user