js2-mode
js2-mode copied to clipboard
"Property 'x' already defined" for static and instance class functions/fields and 'use strict'
Similar to issue #264 static and instance functions with the same name are being confused for the same property. . The error message is only shown in strict mode.
For example, given the following code in a js2-mode buffer:
'use strict';
class A {
static x() { }
x() { }
static y = 1;
y = 2;
}
The x in x() { } will be highlighted red, and it will show the message:
Property 'x' already defined in this object literal. Same is true for y
Is this resolved? (I cannot reproduce it)
Still reproduces here.