1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
=== tests/cases/compiler/flowAfterFinally1.ts ===
declare function openFile(): void
>openFile : Symbol(openFile, Decl(flowAfterFinally1.ts, 0, 0))
declare function closeFile(): void
>closeFile : Symbol(closeFile, Decl(flowAfterFinally1.ts, 0, 33))
declare function someOperation(): {}
>someOperation : Symbol(someOperation, Decl(flowAfterFinally1.ts, 1, 34))
var result: {}
>result : Symbol(result, Decl(flowAfterFinally1.ts, 4, 3))
openFile()
>openFile : Symbol(openFile, Decl(flowAfterFinally1.ts, 0, 0))
try {
result = someOperation()
>result : Symbol(result, Decl(flowAfterFinally1.ts, 4, 3))
>someOperation : Symbol(someOperation, Decl(flowAfterFinally1.ts, 1, 34))
} finally {
closeFile()
>closeFile : Symbol(closeFile, Decl(flowAfterFinally1.ts, 0, 33))
}
result // should not error here
>result : Symbol(result, Decl(flowAfterFinally1.ts, 4, 3))
|