Felipe Armoni fdfe97879e
Disallow reinitializing private elements (#13601)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
2021-08-30 12:44:38 +02:00

16 lines
169 B
JavaScript

class Base {
constructor(obj) {
return obj;
}
}
class Derived extends Base {
#foo() {
return 'bar';
}
static get(obj) {
return obj.#foo();
}
}