TypeScript/tests/cases/conformance/statements/tryStatements/invalidTryStatements2.ts
Tingan Ho 4f3e13ab8c Typo
2017-08-02 20:55:19 +02:00

20 lines
No EOL
549 B
TypeScript

function fn() {
catch(x) { } // error missing try
finally { } // potential error; can be absorbed by the 'catch'
try { }; // error missing finally
}
function fn2() {
finally { } // error missing try
catch (x) { } // error missing try
try { } finally { } // statement is here, so the 'catch' clause above doesn't absorb errors from the 'finally' clause below
finally { } // error missing try
catch (x) { } // error missing try
try { } catch () { } // error missing catch binding
}