mirror of
https://github.com/swc-project/swc.git
synced 2024-12-24 06:05:02 +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;
|
|
}
|