35 lines
441 B
Plaintext
35 lines
441 B
Plaintext
=== tests/cases/compiler/flowInFinally1.ts ===
|
|
|
|
class A {
|
|
>A : A
|
|
|
|
constructor() { }
|
|
method() { }
|
|
>method : () => void
|
|
}
|
|
|
|
let a: A | null = null;
|
|
>a : A | null
|
|
>A : A
|
|
>null : null
|
|
>null : null
|
|
|
|
try {
|
|
a = new A();
|
|
>a = new A() : A
|
|
>a : A | null
|
|
>new A() : A
|
|
>A : typeof A
|
|
|
|
} finally {
|
|
if (a) {
|
|
>a : A | null
|
|
|
|
a.method();
|
|
>a.method() : void
|
|
>a.method : () => void
|
|
>a : A
|
|
>method : () => void
|
|
}
|
|
}
|