File tree Expand file tree Collapse file tree 2 files changed +7
-15
lines changed
Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,13 @@ impl<'a> Binder for VariableDeclarator<'a> {
4646 let mut var_scope_ids = vec ! [ ] ;
4747 if !builder. current_scope_flags ( ) . is_var ( ) {
4848 for scope_id in builder. scope . ancestors ( current_scope_id) . skip ( 1 ) {
49+ let flag = builder. scope . get_flags ( scope_id) ;
50+ // Skip the catch clause, the scope bindings have been cloned to the child block scope
51+ if flag. is_catch_clause ( ) {
52+ continue ;
53+ }
4954 var_scope_ids. push ( scope_id) ;
50- if builder . scope . get_flags ( scope_id ) . is_var ( ) {
55+ if flag . is_var ( ) {
5156 break ;
5257 }
5358 }
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ commit: d8086f14
22
33parser_typescript Summary:
44AST Parsed : 6444/6456 (99.81%)
5- Positive Passed: 6421 /6456 (99.46 %)
5+ Positive Passed: 6422 /6456 (99.47 %)
66Negative Passed: 1160/5653 (20.52%)
77Expect Syntax Error: "compiler/ClassDeclaration10.ts"
88Expect Syntax Error: "compiler/ClassDeclaration11.ts"
@@ -4639,19 +4639,6 @@ Expect to Parse: "compiler/withStatementInternalComments.ts"
46394639 2 │ /*1*/ with /*2*/ ( /*3*/ false /*4*/ ) /*5*/ {}
46404640 · ────
46414641 ╰────
4642- Expect to Parse: "conformance/async/es6/asyncWithVarShadowing_es6.ts"
4643-
4644- × Identifier `x` has already been declared
4645- ╭─[conformance/async/es6/asyncWithVarShadowing_es6.ts:130:14]
4646- 129 │ }
4647- 130 │ catch ({ x }) {
4648- · ┬
4649- · ╰── `x` has already been declared here
4650- 131 │ var x;
4651- · ┬
4652- · ╰── It can not be redeclared here
4653- 132 │ }
4654- ╰────
46554642Expect to Parse: "conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts"
46564643
46574644 × Classes may not have a static property named prototype
You can’t perform that action at this time.
0 commit comments