[FIR] Support enhancing intersection overrides
When a type annotated with @PurelyImplements (explicitly or implicitly) inherited some methods from a java supertype and the purely implemented Kotlin supertype, it was inconsistent which of the signatures the intersection override would have (with or without flexible types). This commit adds support for the enhancement of intersection overrides. If one of the overridden methods has non-flexible types, the enhanced method will have non-flexible types. This fixes some false negative nullability type mismatches. #KT-59921 Fixed
This commit is contained in:
committed by
Space Team
parent
3b841dcb98
commit
9ec0210c04
+5
@@ -16069,6 +16069,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/fakeOverride/intersectionOverrideBetweenValAndVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("javaInheritsKotlinIntersectionOverride.kt")
|
||||
public void testJavaInheritsKotlinIntersectionOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/fakeOverride/javaInheritsKotlinIntersectionOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kjkWithPackagePrivate.kt")
|
||||
public void testKjkWithPackagePrivate() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/fakeOverride/kjkWithPackagePrivate.kt");
|
||||
|
||||
Reference in New Issue
Block a user