mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
16 lines
655 B
Plaintext
16 lines
655 B
Plaintext
fieldAndGetterWithSameName.ts(2,5): error TS2300: Duplicate identifier 'x'.
|
|
fieldAndGetterWithSameName.ts(2,5): error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
|
|
fieldAndGetterWithSameName.ts(3,7): error TS2300: Duplicate identifier 'x'.
|
|
|
|
|
|
==== fieldAndGetterWithSameName.ts (3 errors) ====
|
|
export class C {
|
|
x: number;
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
~
|
|
!!! error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
|
|
get x(): number { return 1; }
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
} |