WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
219841
NewExpression : new MemberExpression : new SuperProperty throws early SyntaxError
https://bugs.webkit.org/show_bug.cgi?id=219841
Summary
NewExpression : new MemberExpression : new SuperProperty throws early SyntaxE...
bathos
Reported
2020-12-13 15:15:17 PST
(See similar, but not identical, V8 issue:
https://bugs.chromium.org/p/v8/issues/detail?id=11261
) What steps will reproduce the problem? ``` let obj = ({ __proto__: { x: class {} }, y() { return new super.x; } }); ``` What is the expected output? A normal completion whose value is a new object. What do you see instead? An early SyntaxError is thrown. Notes This is a valid NewExpression. SpiderMonkey exhibits the expected behavior. V8 doesn’t, but instead of an early SyntaxError, it throws a ReferenceError only if `obj.y()` is called. This is not specific to object literals or absent parentheses. The same behavior can be observed using class syntax to establish the HomeObject, e.g. ``` class Sup { static SupProperty = class {} } class Sub extends Sup { static SubProperty() { return new super.supProperty(); } } Sub.subProperty(); ```
Attachments
Add attachment
proposed patch, testcase, etc.
bathos
Comment 1
2020-12-13 15:19:31 PST
Test262 issue:
https://github.com/tc39/test262/issues/2920
bathos
Comment 2
2020-12-13 15:46:37 PST
Apologies, I hadn’t realized this was tested in Safari 12.1. In 14.1 TP, it appears this has been fixed.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug