TypeScript/tests/baselines/reference/propertyAndAccessorWithSameName.errors.txt

36 lines
977 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts (8 errors) ====
class C {
x: number;
get x() { // error
~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
~
!!! Duplicate identifier 'x'.
return 1;
}
}
class D {
x: number;
set x(v) { } // error
~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
~
!!! Duplicate identifier 'x'.
}
class E {
private x: number;
get x() { // error
~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
~
!!! Duplicate identifier 'x'.
return 1;
}
set x(v) { }
~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
~
!!! Duplicate identifier 'x'.
}