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 <javascript:> 
>
> On Thu, Jan 16, 2020 at 4:33 AM <[email protected] <javascript:>> 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] <javascript:>
>> 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] <javascript:>.
>> 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 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/8ffaf5c3-c56b-4727-ae74-4ec1540494c2%40googlegroups.com.

Reply via email to