remove finally from completion record in trystatement (#10277)
This commit is contained in:
parent
66727632e8
commit
be2cbde560
@ -0,0 +1,9 @@
|
||||
const x = do {
|
||||
try {
|
||||
a();
|
||||
} catch (e) {
|
||||
b();
|
||||
} finally {
|
||||
c();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
{
|
||||
"plugins": ["transform-block-scoping", "proposal-do-expressions"]
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
var x = function () {
|
||||
try {
|
||||
return a();
|
||||
} catch (e) {
|
||||
return b();
|
||||
} finally {
|
||||
c();
|
||||
}
|
||||
}();
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user