Update 'this' extension receiver when there's a smart cast

If 'this' (implicit or explicit) was used as an extension receiver,
and the corresponding call required a smart-cast,
this information was effectively lost in "old" resolution & inference,
but is required by "old" JVM BE to generate proper CHECKCASTs.
This commit is contained in:
Dmitry Petrov
2017-07-19 11:56:42 +03:00
parent c9d54d7110
commit bf3e896464
9 changed files with 91 additions and 1 deletions
@@ -17600,6 +17600,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("kt19058.kt")
public void testKt19058() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/kt19058.kt");
doTest(fileName);
}
@TestMetadata("kt19100.kt")
public void testKt19100() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/kt19100.kt");
doTest(fileName);
}
@TestMetadata("lambdaArgumentWithoutType.kt")
public void testLambdaArgumentWithoutType() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/lambdaArgumentWithoutType.kt");