Don't add delegated members from error types
This commit is contained in:
@@ -129,7 +129,7 @@ public final class DelegationResolver<T extends CallableMemberDescriptor> {
|
||||
continue;
|
||||
}
|
||||
JetType delegatedTraitType = typeResolver.resolve(typeReference);
|
||||
if (delegatedTraitType == null) {
|
||||
if (delegatedTraitType == null || delegatedTraitType.isError()) {
|
||||
continue;
|
||||
}
|
||||
Collection<T> delegatesForTrait = generateDelegatesForTrait(delegatedMembers, delegatedTraitType);
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
class C : <!UNRESOLVED_REFERENCE, DELEGATION_NOT_TO_TRAIT!>Base1<!> by <!UNRESOLVED_REFERENCE!>Base2<!>(1) {
|
||||
fun test() { }
|
||||
}
|
||||
@@ -5331,6 +5331,11 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
doTest("compiler/testData/diagnostics/tests/override/kt880.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("MissingDelegate.kt")
|
||||
public void testMissingDelegate() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/override/MissingDelegate.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("MultipleDefaultParametersInSupertypes.kt")
|
||||
public void testMultipleDefaultParametersInSupertypes() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/override/MultipleDefaultParametersInSupertypes.kt");
|
||||
|
||||
Reference in New Issue
Block a user