2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/getAndSetNotIdenticalType.ts(2,5): error TS2380: 'get' and 'set' accessor must have the same type.
|
2014-12-17 00:56:56 +01:00
|
|
|
tests/cases/compiler/getAndSetNotIdenticalType.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/getAndSetNotIdenticalType.ts(5,5): error TS2380: 'get' and 'set' accessor must have the same type.
|
2014-12-17 00:56:56 +01:00
|
|
|
tests/cases/compiler/getAndSetNotIdenticalType.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
2014-09-12 22:35:07 +02:00
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/getAndSetNotIdenticalType.ts (4 errors) ====
|
|
|
|
class C {
|
|
|
|
get x(): number {
|
2014-12-17 00:56:56 +01:00
|
|
|
~~~~~~~~~~~~~~~~~
|
2014-07-13 01:04:16 +02:00
|
|
|
~
|
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 1;
|
|
|
|
~~~~~~~~~~~~~~~~~
|
|
|
|
}
|
|
|
|
~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2380: 'get' and 'set' accessor must have the same type.
|
2014-07-13 01:04:16 +02:00
|
|
|
set x(v: string) { }
|
|
|
|
~~~~~~~~~~~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2380: 'get' and 'set' accessor must have the same type.
|
2014-12-17 00:56:56 +01:00
|
|
|
~
|
|
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|