chore: add test for ecma private fields & methods

This commit is contained in:
numToStr 2021-11-25 18:37:57 +05:30 committed by Stephan Seitz
parent 801c7f0b48
commit bbbb2f1f32

View file

@ -0,0 +1,25 @@
class H {
pub_field = "Hello";
// ^ property
#priv_field = "World!";
// ^ property
#private_method() {
// ^ method
return `${this.pub_field} -- ${this.#priv_field}`;
// ^ property
// ^ property
}
public_method() {
// ^ method
return this.#private_method();
// ^ method
}
ok() {
return this.public_method();
// ^ method
}
}