2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/thisInAccessors.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
|
|
tests/cases/compiler/thisInAccessors.ts(7,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
|
|
tests/cases/compiler/thisInAccessors.ts(13,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
|
|
tests/cases/compiler/thisInAccessors.ts(16,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
|
|
tests/cases/compiler/thisInAccessors.ts(23,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
|
|
tests/cases/compiler/thisInAccessors.ts(27,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/thisInAccessors.ts (6 errors) ====
|
|
|
|
// this capture only in getter
|
|
|
|
class GetterOnly {
|
|
|
|
get Value() {
|
|
|
|
~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
2014-07-13 01:04:16 +02:00
|
|
|
var fn = () => this;
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
set Value(val) {
|
|
|
|
~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// this capture only in setter
|
|
|
|
class SetterOnly {
|
|
|
|
get Value() {
|
|
|
|
~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
2014-07-13 01:04:16 +02:00
|
|
|
return '';
|
|
|
|
}
|
|
|
|
set Value(val) {
|
|
|
|
~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
2014-07-13 01:04:16 +02:00
|
|
|
var fn = () => this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// this capture only in both setter and getter
|
|
|
|
class GetterAndSetter {
|
|
|
|
get Value() {
|
|
|
|
~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
2014-07-13 01:04:16 +02:00
|
|
|
var fn = () => this;
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
set Value(val) {
|
|
|
|
~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
2014-07-13 01:04:16 +02:00
|
|
|
var fn = () => this;
|
|
|
|
}
|
|
|
|
}
|