mirror of
https://github.com/swc-project/swc.git
synced 2024-11-24 18:28:13 +03:00
22 lines
295 B
TypeScript
22 lines
295 B
TypeScript
// @target: es2015
|
|
|
|
class A {
|
|
#foo = this.#bar; // Error
|
|
#bar = 3;
|
|
}
|
|
|
|
class A2 {
|
|
#foo = this.#bar(); // No Error
|
|
#bar() { return 3 };
|
|
}
|
|
|
|
class A3 {
|
|
#foo = this.#bar; // No Error
|
|
get #bar() { return 3 };
|
|
}
|
|
|
|
class B {
|
|
#foo = this.#bar; // Error
|
|
#bar = this.#foo;
|
|
}
|