9 lines
316 B
Plaintext
9 lines
316 B
Plaintext
==== tests/cases/compiler/fieldAndGetterWithSameName.ts (2 errors) ====
|
|
export class C {
|
|
x: number;
|
|
get x(): number { return 1; }
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
} |