Files

34 lines
417 B
TypeScript

//// [tests/cases/compiler/flowInFinally1.ts] ////
//// [flowInFinally1.ts]
class A {
constructor() { }
method() { }
}
let a: A | null = null;
try {
a = new A();
} finally {
if (a) {
a.method();
}
}
//// [flowInFinally1.js]
"use strict";
class A {
constructor() { }
method() { }
}
let a = null;
try {
a = new A();
}
finally {
if (a) {
a.method();
}
}