RESOLVED FIXED298927
[JSC] Improve error message for calling constructor without `new`
https://bugs.webkit.org/show_bug.cgi?id=298927
Summary [JSC] Improve error message for calling constructor without `new`
Sosuke Suzuki
Reported 2025-09-16 00:12:12 PDT
Calling constructors without `new` is invalid: class Foo {} Foo(); Current JSC throws a TypeError with the message "Cannot call a class constructor without |new|" for such code. This patch changes this error message to include the constructor name for debugging experience.
Attachments
Sosuke Suzuki
Comment 1 2025-09-16 00:20:56 PDT
Radar WebKit Bug Importer
Comment 2 2025-09-23 00:13:36 PDT
Radar WebKit Bug Importer
Comment 3 2025-09-23 00:13:37 PDT
EWS
Comment 4 2025-10-05 06:23:38 PDT
Committed 301023@main (dabbab2ba61e): <https://commits.webkit.org/301023@main> Reviewed commits have been landed. Closing PR #50792 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.