Skip to content

Commit ba61c72

Browse files
committed
Additional assignment test
1 parent b511ff9 commit ba61c72

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
fun foo() {
2+
var v: String? = null
3+
v<!UNSAFE_CALL!>.<!>length()
4+
v = "abc"
5+
<!DEBUG_INFO_SMARTCAST!>v<!>.length()
6+
v = null
7+
v<!UNSAFE_CALL!>.<!>length()
8+
v = "abc"
9+
<!DEBUG_INFO_SMARTCAST!>v<!>.length()
10+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package
2+
3+
internal fun foo(): kotlin.Unit

compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestGenerated.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11453,6 +11453,12 @@ public void testAllFilesPresentInVarnotnull() throws Exception {
1145311453
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/varnotnull"), Pattern.compile("^(.+)\\.kt$"), true);
1145411454
}
1145511455

11456+
@TestMetadata("assignment.kt")
11457+
public void testAssignment() throws Exception {
11458+
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/assignment.kt");
11459+
doTest(fileName);
11460+
}
11461+
1145611462
@TestMetadata("false01.kt")
1145711463
public void testFalse01() throws Exception {
1145811464
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/false01.kt");

0 commit comments

Comments
 (0)