TypeScript/tests/baselines/reference/propertyAndAccessorWithSameName.errors.txt
2014-07-12 17:30:19 -07:00

36 lines
977 B
Plaintext

==== 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'.
}