remove finally from completion record in trystatement (#10277)

This commit is contained in:
Tan Li Hau 2019-08-01 15:24:08 +08:00 committed by Nicolò Ribaudo
parent 66727632e8
commit be2cbde560
4 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,9 @@
const x = do {
try {
a();
} catch (e) {
b();
} finally {
c();
}
}

View File

@ -0,0 +1,3 @@
{
"plugins": ["transform-block-scoping", "proposal-do-expressions"]
}

View File

@ -0,0 +1,9 @@
var x = function () {
try {
return a();
} catch (e) {
return b();
} finally {
c();
}
}();

View File

@ -33,7 +33,6 @@ export function getCompletionRecords(): NodePath[] {
} else if (this.isTryStatement()) {
paths = addCompletionRecords(this.get("block"), paths);
paths = addCompletionRecords(this.get("handler"), paths);
paths = addCompletionRecords(this.get("finalizer"), paths);
} else if (this.isCatchClause()) {
paths = addCompletionRecords(this.get("body"), paths);
} else {