2025-03-11 [06:53:59.0918] Hi, I'd like to know about this bug is valid? v8, spider monkey and JSC resulted as 'something'. If invalid, where can I find the section? :) And the spec said: 114.15.1 Static Semantics: Early Errors Catch : catch ( CatchParameter ) Block It is a Syntax Error if the BoundNames of CatchParameter contains any duplicate elements. It is a Syntax Error if any element of the BoundNames of CatchParameter also occurs in the LexicallyDeclaredNames of Block. It is a Syntax Error if any element of the BoundNames of CatchParameter also occurs in the VarDeclaredNames of Block. https://issues.chromium.org/u/2/issues/401141840 [06:57:26.0300] * Hi, I'd like to know about this bug is valid.. v8, spider monkey and JSC resulted as 'something'. If invalid, where can I find the section? :) And the spec said: 114.15.1 Static Semantics: Early Errors Catch : catch ( CatchParameter ) Block It is a Syntax Error if the BoundNames of CatchParameter contains any duplicate elements. It is a Syntax Error if any element of the BoundNames of CatchParameter also occurs in the LexicallyDeclaredNames of Block. It is a Syntax Error if any element of the BoundNames of CatchParameter also occurs in the VarDeclaredNames of Block. https://issues.chromium.org/u/2/issues/401141840 [07:05:25.0358] * Hi, I'd like to know about this bug is valid.. v8, spider monkey and JSC resulted as 'something'. If invalid, where can I find the section? :) #sec-try-statement-static-semantics-early-errors said: 114.15.1 Static Semantics: Early Errors Catch : catch ( CatchParameter ) Block It is a Syntax Error if the BoundNames of CatchParameter contains any duplicate elements. It is a Syntax Error if any element of the BoundNames of CatchParameter also occurs in the LexicallyDeclaredNames of Block. It is a Syntax Error if any element of the BoundNames of CatchParameter also occurs in the VarDeclaredNames of Block. https://issues.chromium.org/u/2/issues/401141840 [07:27:47.0606] * Hi, I'd like to know about this bug is valid.. v8, spider monkey and JSC resulted as 'something'. If invalid, where can I find the covered section? :) #sec-try-statement-static-semantics-early-errors said: 114.15.1 Static Semantics: Early Errors Catch : catch ( CatchParameter ) Block It is a Syntax Error if the BoundNames of CatchParameter contains any duplicate elements. It is a Syntax Error if any element of the BoundNames of CatchParameter also occurs in the LexicallyDeclaredNames of Block. It is a Syntax Error if any element of the BoundNames of CatchParameter also occurs in the VarDeclaredNames of Block. https://issues.chromium.org/u/2/issues/401141840 2025-03-19 [17:04:27.0524] Seokho Song: I agree that the given script is a Syntax Error (i.e., the bug appears to be valid). 2025-03-23 [00:07:19.0458] I'm working on that on V8, there are test262 cases existed that need to be updated. It feels like a breaking change. I'll open a PR to update the test262 cases to make sure they comply with the spec soon (or does this need a spec update to match with the engines' behavior?) https://github.com/tc39/test262/blob/main/test/annexB/language/statements/try/catch-redeclared-var-statement-captured.js [01:18:06.0062] * I'm working on that on V8, there are test262 cases existed that need to be updated. It feels like a breaking change. I'll open a PR to update the test262 cases to make sure they comply with the spec soon (or does this need a spec update to match with the engines' behavior? - in this case I'll file an issue on ecma262) https://github.com/tc39/test262/blob/main/test/annexB/language/statements/try/catch-redeclared-var-statement-captured.js [04:01:54.0557] I'm not sure whether the spec should be changed to match implementations or vice versa in this case. Maybe start with an issue on ecma262 to get an official opinion. 2025-03-24 [20:45:09.0752] Thanks! I filed an issue https://github.com/tc39/ecma262/issues/3551 2025-03-26 [17:57:16.0259] Seokho Song: Sorry, I forgot about Annex B. And the parser I used to check doesn't know about Annex B. [18:12:37.0266] It's okay haha at least I learned something about Annex B! [18:17:00.0315] I have a couple PRs toward incorporating the Annex B modifications ('monkey patches') into the main body of the spec, which would prevent this kind of problem. But they haven't seen much attention.