mirror of
https://github.com/swc-project/swc.git
synced 2024-12-29 00:23:10 +03:00
14 lines
459 B
TypeScript
14 lines
459 B
TypeScript
// @strict: true
|
|
// @target: es6
|
|
|
|
class A {
|
|
[k: string]: any;
|
|
#foo = 3;
|
|
["#bar"] = this["#bar"] // Error (private identifiers should not prevent circularity checking for computeds)
|
|
constructor(message: string) {
|
|
this.#f = 3 // Error (index signatures do not implicitly declare private names)
|
|
this["#foo"] = 3; // Okay (type has index signature and "#foo" does not collide with private identifier #foo)
|
|
|
|
}
|
|
}
|