51 lines
2.1 KiB
Plaintext
51 lines
2.1 KiB
Plaintext
tests/cases/compiler/duplicateObjectLiteralProperty.ts(16,9): error TS1118: An object literal cannot have multiple get/set accessors with the same name.
|
|
tests/cases/compiler/duplicateObjectLiteralProperty.ts(2,5): error TS2300: Duplicate identifier 'a'.
|
|
tests/cases/compiler/duplicateObjectLiteralProperty.ts(4,5): error TS2300: Duplicate identifier 'a'.
|
|
tests/cases/compiler/duplicateObjectLiteralProperty.ts(5,5): error TS2300: Duplicate identifier '\u0061'.
|
|
tests/cases/compiler/duplicateObjectLiteralProperty.ts(6,5): error TS2300: Duplicate identifier 'a'.
|
|
tests/cases/compiler/duplicateObjectLiteralProperty.ts(7,9): error TS2300: Duplicate identifier 'c'.
|
|
tests/cases/compiler/duplicateObjectLiteralProperty.ts(8,9): error TS2300: Duplicate identifier '"c"'.
|
|
tests/cases/compiler/duplicateObjectLiteralProperty.ts(14,9): error TS2300: Duplicate identifier 'a'.
|
|
tests/cases/compiler/duplicateObjectLiteralProperty.ts(15,9): error TS2300: Duplicate identifier 'a'.
|
|
tests/cases/compiler/duplicateObjectLiteralProperty.ts(16,9): error TS2300: Duplicate identifier 'a'.
|
|
|
|
|
|
==== tests/cases/compiler/duplicateObjectLiteralProperty.ts (10 errors) ====
|
|
var x = {
|
|
a: 1,
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'a'.
|
|
b: true, // OK
|
|
a: 56, // Duplicate
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'a'.
|
|
\u0061: "ss", // Duplicate
|
|
~~~~~~
|
|
!!! error TS2300: Duplicate identifier '\u0061'.
|
|
a: {
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'a'.
|
|
c: 1,
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'c'.
|
|
"c": 56, // Duplicate
|
|
~~~
|
|
!!! error TS2300: Duplicate identifier '"c"'.
|
|
}
|
|
};
|
|
|
|
|
|
var y = {
|
|
get a() { return 0; },
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'a'.
|
|
set a(v: number) { },
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'a'.
|
|
get a() { return 0; }
|
|
~
|
|
!!! error TS1118: An object literal cannot have multiple get/set accessors with the same name.
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'a'.
|
|
};
|
|
|