TypeScript/tests/cases/compiler/flowInFinally1.ts
2016-10-16 20:57:51 -07:00

16 lines
181 B
TypeScript

// @strictNullChecks: true
class A {
constructor() { }
method() { }
}
let a: A | null = null;
try {
a = new A();
} finally {
if (a) {
a.method();
}
}