2014-09-12 22:35:07 +02:00
tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(5,21): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.
2014-12-17 00:56:56 +01:00
tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(12,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2014-09-12 22:35:07 +02:00
tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(15,21): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.
2014-12-17 00:56:56 +01:00
tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(24,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2014-09-12 22:35:07 +02:00
tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(25,13): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.
2014-12-17 00:56:56 +01:00
tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(34,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2014-09-12 22:35:07 +02:00
tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(35,13): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.
2014-07-19 01:13:21 +02:00
==== tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts (8 errors) ====
2014-07-13 01:04:16 +02:00
class class1 {
get a(): number {
~
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 x2 = {
doStuff: (callback) => () => {
var _this = 2;
2014-07-19 01:13:21 +02:00
~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.
2014-07-13 01:04:16 +02:00
return callback(this);
}
}
return 10;
}
set a(val: number) {
~
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 x2 = {
doStuff: (callback) => () => {
var _this = 2;
2014-07-19 01:13:21 +02:00
~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.
2014-07-13 01:04:16 +02:00
return callback(this);
}
}
}
}
class class2 {
get a(): number {
~
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 _this = 2;
2014-07-19 01:13:21 +02:00
~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.
2014-07-13 01:04:16 +02:00
var x2 = {
doStuff: (callback) => () => {
return callback(this);
}
}
return 10;
}
set a(val: number) {
~
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 _this = 2;
2014-07-19 01:13:21 +02:00
~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.
2014-07-13 01:04:16 +02:00
var x2 = {
doStuff: (callback) => () => {
return callback(this);
}
}
}
}