Receiver of a safe call is not null inside the call also for extension functions + a pair of tests #KT-9033 Fixed

This commit is contained in:
Mikhail Glukhikh
2015-09-09 17:43:42 +03:00
parent 22229af930
commit 1667f18d7c
8 changed files with 43 additions and 2 deletions
@@ -13895,6 +13895,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("extensionCall.kt")
public void testExtensionCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/extensionCall.kt");
doTest(fileName);
}
@TestMetadata("falseArgument.kt")
public void testFalseArgument() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/falseArgument.kt");
@@ -830,6 +830,21 @@ public class JetDiagnosticsTestWithStdLibGenerated extends AbstractJetDiagnostic
}
}
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Smartcasts extends AbstractJetDiagnosticsTestWithStdLib {
public void testAllFilesPresentInSmartcasts() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/smartcasts"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("letUsesOwnReceiver.kt")
public void testLetUsesOwnReceiver() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letUsesOwnReceiver.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/varargs")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)