Fix algorithm of determining modality for fake overrides
Previously we inferred "open" if there was at least one open member in the hierarchy. However, that's not correct when that member is overridden by another member in the hierarchy which is abstract. This led to incorrect code being accepted by the front-end, and an exception during the bridge generation #KT-12467 Fixed
This commit is contained in:
@@ -12807,6 +12807,24 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("FakeOverrideModality1.kt")
|
||||
public void testFakeOverrideModality1() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/FakeOverrideModality1.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("FakeOverrideModality2.kt")
|
||||
public void testFakeOverrideModality2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/FakeOverrideModality2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("FakeOverrideModality3.kt")
|
||||
public void testFakeOverrideModality3() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/FakeOverrideModality3.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("Generics.kt")
|
||||
public void testGenerics() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/Generics.kt");
|
||||
@@ -12825,6 +12843,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt12467.kt")
|
||||
public void testKt12467() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt12467.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt12482.kt")
|
||||
public void testKt12482() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt12482.kt");
|
||||
|
||||
Reference in New Issue
Block a user