Skip to content

Commit 63cb614

Browse files
committed
Add test for empty left block
1 parent 125f146 commit 63cb614

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/compiler/strict-init.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ export class ExplicitConstructorInit {
2323
}
2424
}
2525

26+
export class EmptyIfBlock {
27+
field: i32;
28+
29+
constructor(x: i32) {
30+
if ((x + 5) == 6) {
31+
} else {
32+
this.field = 7;
33+
}
34+
}
35+
}
36+
2637
export class NonDefiniteIf {
2738
p: f64;
2839
constructor(a: i32) {

0 commit comments

Comments
 (0)