[FIR] fix subtyping for definitely notnull types.

The current implementation doesn't consider Foo a subtype of Captured<in
Foo>!!, since AbstractTypeCheckerContext::checkSubtypeForSpecialCases
does not handle DefinitelyNotNullType cases. This PR adds handling of
DefinitelyNotNullType by looking at its original type.

^KT-42824 Fixed
This commit is contained in:
Juan Chen
2020-10-27 04:18:31 +03:00
committed by Mikhail Glukhikh
parent eb804709da
commit 9486f58fb1
11 changed files with 79 additions and 14 deletions
@@ -17441,6 +17441,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/javaInterop/generics/javaNestedSamInterface.kt");
}
@TestMetadata("kt42824.kt")
public void testKt42824() throws Exception {
runTest("compiler/testData/codegen/box/javaInterop/generics/kt42824.kt");
}
@TestMetadata("kt42825.kt")
public void testKt42825() throws Exception {
runTest("compiler/testData/codegen/box/javaInterop/generics/kt42825.kt");