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

20 lines
652 B
Plaintext

==== tests/cases/compiler/objectLitPropertyScoping.ts (2 errors) ====
// Should compile, x and y should not be picked up from the properties
function makePoint(x: number, y: number) {
return {
get x() {
~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
return x;
},
get y() {
~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
return y;
},
dist: function () {
return Math.sqrt(x * x + y * y);
}
}
};