OK, I see. I will have a look at that issue.

Joyee Cheung <[email protected]> 于2020年2月7日周五 下午1:40写道:

> Can you reply in https://bugs.chromium.org/p/v8/issues/detail?id=8578 ?
>
> I think there was some suggestion similar to `Attempting to access private
> field '#x'` but we ended up going with the current message instead because
> we thought this one is less confusing - it points out how the user should
> fix this (by enclosing it with a class) instead of just why.
>
> On Friday, February 7, 2020 at 12:52:48 AM UTC+8, Sathya Gunasekaran wrote:
>>
>> +Joyee Cheung
>>
>> On Thu, Jan 16, 2020 at 4:33 AM <[email protected]> wrote:
>>
>>> First I created a test class like this below:
>>>
>>> class Test {
>>>  #x = 'private'
>>> }
>>>
>>> And then when I attempted to get that private field "#x":
>>>
>>> const test = new Test()
>>> console.log(test.#x)
>>>
>>> I recieved an error like this:
>>>
>>> SyntaxError: Private field '#x' must be declared in an enclosing class
>>>
>>>
>>> I thought that this error message is confusing. A better one could be
>>> like this:
>>>
>>> SyntaxError: Attempting to access private field '#x"
>>>
>>> --
>>> --
>>> v8-dev mailing list
>>> [email protected]
>>> http://groups.google.com/group/v8-dev
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "v8-dev" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/v8-dev/f0837372-d8ea-4444-84fc-a6c9d0866656%40googlegroups.com
>>> <https://groups.google.com/d/msgid/v8-dev/f0837372-d8ea-4444-84fc-a6c9d0866656%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> --
> v8-dev mailing list
> [email protected]
> http://groups.google.com/group/v8-dev
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "v8-dev" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/v8-dev/vDlefmP-Kko/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/v8-dev/8ffaf5c3-c56b-4727-ae74-4ec1540494c2%40googlegroups.com
> <https://groups.google.com/d/msgid/v8-dev/8ffaf5c3-c56b-4727-ae74-4ec1540494c2%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/CACMDF%2ByqZAsYD8_XpAeR9JVqShODKwTbOqyPjNVnyjJCA14rWQ%40mail.gmail.com.

Reply via email to