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

20 lines
652 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== 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);
}
}
};