Skip to content

Commit 32ea3b2

Browse files
committed
Add regression test
1 parent 34b35df commit 32ea3b2

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/cases/compiler/controlFlowInstanceof.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// @target: es6
2+
// @strictNullChecks: true
23

34
// Repros from #10167
45

@@ -96,4 +97,13 @@ function goo(x: X) {
9697
x.y;
9798
}
9899
x;
99-
}
100+
}
101+
102+
// Repro from #27282
103+
104+
declare const x: (() => void)|null;
105+
declare const ctor: Function;
106+
107+
if (x instanceof ctor) {
108+
x();
109+
}

0 commit comments

Comments
 (0)