TypeScript/tests/cases/compiler/flowInFinally1.ts

16 lines
181 B
TypeScript
Raw Normal View History

2016-10-17 05:57:51 +02:00
// @strictNullChecks: true
class A {
constructor() { }
method() { }
}
let a: A | null = null;
try {
a = new A();
} finally {
if (a) {
a.method();
}
}