2014-09-12 22:35:07 +02:00
tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(10,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(18,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2014-10-01 02:15:18 +02:00
tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(2,5): error TS2300: Duplicate identifier 'x'.
2014-10-01 20:27:20 +02:00
tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(3,9): error TS2300: Duplicate identifier 'x'.
2014-10-01 02:15:18 +02:00
tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(9,5): error TS2300: Duplicate identifier 'x'.
2014-10-01 20:27:20 +02:00
tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(10,9): error TS2300: Duplicate identifier 'x'.
2014-10-01 02:15:18 +02:00
tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(14,13): error TS2300: Duplicate identifier 'x'.
2014-10-01 20:27:20 +02:00
tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(15,9): error TS2300: Duplicate identifier 'x'.
tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(18,9): error TS2300: Duplicate identifier 'x'.
2014-09-12 22:35:07 +02:00
2014-10-01 02:15:18 +02:00
==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts (11 errors) ====
2014-07-13 01:04:16 +02:00
class C {
x: number;
2014-10-01 02:15:18 +02:00
~
!!! error TS2300: Duplicate identifier 'x'.
2014-07-13 01:04:16 +02:00
get x() { // error
~
2014-09-12 00:19:57 +02:00
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2014-10-01 20:27:20 +02:00
~
!!! error TS2300: Duplicate identifier 'x'.
2014-07-13 01:04:16 +02:00
return 1;
}
}
class D {
x: number;
2014-10-01 02:15:18 +02:00
~
!!! error TS2300: Duplicate identifier 'x'.
2014-07-13 01:04:16 +02:00
set x(v) { } // error
~
2014-09-12 00:19:57 +02:00
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2014-10-01 20:27:20 +02:00
~
2014-09-12 00:19:57 +02:00
!!! error TS2300: Duplicate identifier 'x'.
2014-07-13 01:04:16 +02:00
}
class E {
private x: number;
2014-10-01 02:15:18 +02:00
~
!!! error TS2300: Duplicate identifier 'x'.
2014-07-13 01:04:16 +02:00
get x() { // error
~
2014-09-12 00:19:57 +02:00
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2014-10-01 20:27:20 +02:00
~
!!! error TS2300: Duplicate identifier 'x'.
2014-07-13 01:04:16 +02:00
return 1;
}
set x(v) { }
~
2014-09-12 00:19:57 +02:00
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2014-10-01 20:27:20 +02:00
~
2014-09-12 00:19:57 +02:00
!!! error TS2300: Duplicate identifier 'x'.
2014-07-13 01:04:16 +02:00
}