[Webkit-unassigned] [Bug 236843] New: ReferenceError when using extra parens in class fields
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Feb 18 09:28:49 PST 2022
https://bugs.webkit.org/show_bug.cgi?id=236843
Bug ID: 236843
Summary: ReferenceError when using extra parens in class fields
Product: WebKit
Version: Safari Technology Preview
Hardware: Mac (Intel)
OS: macOS 11
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: mitchell.liam at gmail.com
Created attachment 452527
--> https://bugs.webkit.org/attachment.cgi?id=452527&action=review
Two reproducible examples
Extra params inside class field declarations cause ReferenceErrors.
Example 1:
;(() => {
const a = (x) => x
class B {
c = a(('OK'));
}
// Should write 'OK'
document.write(new B().c)
})()
Throws ReferenceError: Can't find variable: a
Example 2:
;(() => {
const a = 'OK'
class B {
static c = {
d: a,
e: (1),
}
}
// Should write 'OK'
document.write(B.c.d)
})()
Throws ReferenceError: Can't find variable: a
Tested on Safari TP 15.4, Safari 15.2, 15.3, iOS 14.5, 15.0
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220218/a11ec4bb/attachment.htm>
More information about the webkit-unassigned
mailing list