14:03
<Ashley Claymore>

In Chrome:

console.log((new class {
  #id;
  
  test(a,b) {
    return a << #id in b
  }
}).test(0, {}))

Parses without a SyntaxError and results with 'Uncaught TypeError: Cannot convert a Symbol value to a number' when it does (a << #id)
Could someone confirm if this is expected?

14:04
<nicolo-ribaudo>
It should be a parser error, we had the same bug in Babel
14:05
<Ashley Claymore>
Thanks nicolo-ribaudo - yes Babel emits a parser error as you say
14:06
<Ashley Claymore>
I've just realized that I'm making the same mistake in the TypeScript parser
14:09
<nicolo-ribaudo>

It looks like JSC has the same bug:

➜ eshost -e "class C { #x; test() { 0 << #x in {} } }" -t
┌────────────────┬──────────────────────────────────────────────────────────┐
│ ChakraCore     │                                                          │
│                │ SyntaxError: Invalid character                           │
├────────────────┼──────────────────────────────────────────────────────────┤
│ Hermes         │                                                          │
│                │ SyntaxError: invalid expression                          │
├────────────────┼──────────────────────────────────────────────────────────┤
│ JavaScriptCore │ class C { #x; test() { 0 << #x in {} } }                 │
├────────────────┼──────────────────────────────────────────────────────────┤
│ Moddable XS    │                                                          │
│                │ SyntaxError: missing expression                          │
├────────────────┼──────────────────────────────────────────────────────────┤
│ SpiderMonkey   │                                                          │
│                │ SyntaxError: private names aren't valid in this context: │
├────────────────┼──────────────────────────────────────────────────────────┤
│ V8             │ class C { #x; test() { 0 << #x in {} } }                 │
└────────────────┴──────────────────────────────────────────────────────────┘
14:56
<shu>
ah, and we do as well
14:56
<shu>
should fix
14:57
<Ashley Claymore>
want me to raise an issue?
14:57
<shu>
sure, feel free to file, i haven't done it yet
15:12
<Ashley Claymore>
https://bugs.chromium.org/p/v8/issues/detail?id=12259
15:33
<shu>
thank you kindly
19:08
<Justin Ridgewell>
Wait till you see #id in #id in obj
19:10
<shu>
that's fixed by the same fix
19:11
<shu>
which hopefully will land tomorrow
20:03
<Ashley Claymore>
Does anyone have a link to JSC’s issue tracker, I wanted to check if this is already there or not
20:19
<timothygu>
https://bugs.webkit.org/buglist.cgi?bug_status=__open__&component=JavaScriptCore&product=WebKit