2014-09-12 22:35:07 +02:00
tests/cases/compiler/duplicateObjectLiteralProperty.ts(16,9): error TS1118: An object literal cannot have multiple get/set accessors with the same name.
2014-10-01 02:15:18 +02:00
tests/cases/compiler/duplicateObjectLiteralProperty.ts(2,5): error TS2300: Duplicate identifier 'a'.
2014-09-12 22:35:07 +02:00
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'.
2014-10-01 02:15:18 +02:00
tests/cases/compiler/duplicateObjectLiteralProperty.ts(7,9): error TS2300: Duplicate identifier 'c'.
2014-09-12 22:35:07 +02:00
tests/cases/compiler/duplicateObjectLiteralProperty.ts(8,9): error TS2300: Duplicate identifier '"c"'.
2014-10-01 02:15:18 +02:00
tests/cases/compiler/duplicateObjectLiteralProperty.ts(14,9): error TS2300: Duplicate identifier 'a'.
tests/cases/compiler/duplicateObjectLiteralProperty.ts(15,9): error TS2300: Duplicate identifier 'a'.
2014-10-01 20:27:20 +02:00
tests/cases/compiler/duplicateObjectLiteralProperty.ts(16,9): error TS2300: Duplicate identifier 'a'.
2014-09-12 22:35:07 +02:00
2014-11-19 06:29:07 +01:00
==== tests/cases/compiler/duplicateObjectLiteralProperty.ts (10 errors) ====
2014-07-13 01:04:16 +02:00
var x = {
a: 1,
2014-10-01 02:15:18 +02:00
~
!!! error TS2300: Duplicate identifier 'a'.
2014-07-13 01:04:16 +02:00
b: true, // OK
a: 56, // Duplicate
2014-10-01 20:27:20 +02:00
~
2014-09-12 00:19:57 +02:00
!!! error TS2300: Duplicate identifier 'a'.
2014-07-13 01:04:16 +02:00
\u0061: "ss", // Duplicate
2014-10-01 20:27:20 +02:00
~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2300: Duplicate identifier '\u0061'.
2014-07-13 01:04:16 +02:00
a: {
2014-10-01 20:27:20 +02:00
~
!!! error TS2300: Duplicate identifier 'a'.
2014-07-13 01:04:16 +02:00
c: 1,
2014-10-01 02:15:18 +02:00
~
!!! error TS2300: Duplicate identifier 'c'.
2014-07-13 01:04:16 +02:00
"c": 56, // Duplicate
2014-10-01 20:27:20 +02:00
~~~
2014-09-12 00:19:57 +02:00
!!! error TS2300: Duplicate identifier '"c"'.
2014-07-13 01:04:16 +02:00
}
};
var y = {
get a() { return 0; },
~
2014-10-01 02:15:18 +02:00
!!! error TS2300: Duplicate identifier 'a'.
2014-07-13 01:04:16 +02:00
set a(v: number) { },
~
2014-10-01 02:15:18 +02:00
!!! error TS2300: Duplicate identifier 'a'.
2014-07-13 01:04:16 +02:00
get a() { return 0; }
~
2014-09-12 00:19:57 +02:00
!!! error TS1118: An object literal cannot have multiple get/set accessors with the same name.
2014-10-01 20:27:20 +02:00
~
2014-09-12 00:19:57 +02:00
!!! error TS2300: Duplicate identifier 'a'.
2014-07-13 01:04:16 +02:00
};