TypeScript/tests/cases/compiler/noUnusedLocals_writeOnlyProperty_dynamicNames.ts

14 lines
215 B
TypeScript
Raw Normal View History

// @noUnusedLocals: true
// @lib: es6
const x = Symbol("x");
const y = Symbol("y");
class C {
private [x]: number;
private [y]: number;
m() {
this[x] = 0; // write-only
this[y];
}
}