[Webkit-unassigned] [Bug 189316] New: The error message for reassignment to const variables should say “variable” not “property"

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 5 13:35:45 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=189316

            Bug ID: 189316
           Summary: The error message for reassignment to const variables
                    should say “variable” not “property"
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: tdenney at apple.com

In the following JS:

        "use strict";

        class Example {
            get thing() { return 0; }
        }

        const example = new Example();
        example.thing = 1; // TypeError: Attempted to assign to readonly property.
        example = new Example(); // TypeError: Attempted to assign to readonly property.

The same error message appears for both assignments, however the latter should read “TypeError: Attempted to assign to readonly variable.” rather than property.

-- 
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/20180905/d5db7494/attachment.html>


More information about the webkit-unassigned mailing list