[FE] Don't throw assertion in OverrideResolver if directOverridden is empty

Those descriptors may be empty in case user made a mistake and tried to
  delegate implementation of abstract class instead of interface (and
  we don't add functions from abstract class to overriden descriptors
  of fake overrides in case of delegation by)

#KT-40510 Fixed
This commit is contained in:
Dmitriy Novozhilov
2020-12-17 12:21:34 +03:00
parent dea01125d6
commit 6296f6dc33
6 changed files with 65 additions and 1 deletions
@@ -7389,6 +7389,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/delegation/Delegation_ScopeInitializationOrder.kt");
}
@Test
@TestMetadata("kt40510.kt")
public void testKt40510() throws Exception {
runTest("compiler/testData/diagnostics/tests/delegation/kt40510.kt");
}
@Test
@TestMetadata("kt8154.kt")
public void testKt8154() throws Exception {
@@ -7383,6 +7383,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
runTest("compiler/testData/diagnostics/tests/delegation/Delegation_ScopeInitializationOrder.kt");
}
@Test
@TestMetadata("kt40510.kt")
public void testKt40510() throws Exception {
runTest("compiler/testData/diagnostics/tests/delegation/kt40510.kt");
}
@Test
@TestMetadata("kt8154.kt")
public void testKt8154() throws Exception {