diff --git a/tests/cases/compiler/controlFlowInstanceof.ts b/tests/cases/compiler/controlFlowInstanceof.ts index 56f3ff97e4c..f9cf844572f 100644 --- a/tests/cases/compiler/controlFlowInstanceof.ts +++ b/tests/cases/compiler/controlFlowInstanceof.ts @@ -1,4 +1,5 @@ // @target: es6 +// @strictNullChecks: true // Repros from #10167 @@ -96,4 +97,13 @@ function goo(x: X) { x.y; } x; -} \ No newline at end of file +} + +// Repro from #27282 + +declare const x: (() => void)|null; +declare const ctor: Function; + +if (x instanceof ctor) { + x(); +}