Bug 247426

Summary: Duplicated name in class static block should be normal but throws SyntaxError
Product: WebKit Reporter: Kanguk Lee <p51lee>
Component: JavaScriptCoreAssignee: Yijia Huang <yijia_huang>
Status: RESOLVED FIXED    
Severity: Normal CC: mark.lam, webkit-bug-importer, yijia_huang, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   

Kanguk Lee
Reported 2022-11-03 08:47:29 PDT
// input.js class x { static { var x ; } } ________________________________ Hello, Executing the input.js using JSC throws SyntaxError, but it is expected to terminate normally. Running the input.js with JSC gives --- $ jsc input.js Exception: SyntaxError: Cannot declare a var variable that shadows a let/const/class variable: 'x'. at input.js:1 --- while other engines behave like --- # V8 $ node input.js // no error # GraalJS $ js input.js // no error --- WebKit version: 615.1.10
Attachments
Radar WebKit Bug Importer
Comment 1 2022-11-03 18:06:57 PDT
Yijia Huang
Comment 2 2022-11-03 22:50:43 PDT
EWS
Comment 3 2022-11-04 00:41:41 PDT
Committed 256311@main (d102e7a7748f): <https://commits.webkit.org/256311@main> Reviewed commits have been landed. Closing PR #6126 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.