2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/gettersAndSettersErrors.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
2014-12-17 00:56:56 +01:00
|
|
|
tests/cases/compiler/gettersAndSettersErrors.ts(2,16): error TS2300: Duplicate identifier 'Foo'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/gettersAndSettersErrors.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
2014-12-17 00:56:56 +01:00
|
|
|
tests/cases/compiler/gettersAndSettersErrors.ts(3,16): error TS2300: Duplicate identifier 'Foo'.
|
|
|
|
tests/cases/compiler/gettersAndSettersErrors.ts(5,12): error TS2300: Duplicate identifier 'Foo'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/gettersAndSettersErrors.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
|
|
tests/cases/compiler/gettersAndSettersErrors.ts(7,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
|
|
tests/cases/compiler/gettersAndSettersErrors.ts(11,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
|
|
tests/cases/compiler/gettersAndSettersErrors.ts(11,17): error TS2379: Getter and setter accessors do not agree in visibility.
|
2014-12-17 00:56:56 +01:00
|
|
|
tests/cases/compiler/gettersAndSettersErrors.ts(12,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/gettersAndSettersErrors.ts(12,16): error TS2379: Getter and setter accessors do not agree in visibility.
|
|
|
|
|
|
|
|
|
2014-10-01 02:15:18 +02:00
|
|
|
==== tests/cases/compiler/gettersAndSettersErrors.ts (11 errors) ====
|
2014-07-13 01:04:16 +02:00
|
|
|
class C {
|
|
|
|
public get Foo() { return "foo";} // ok
|
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
2014-10-01 02:15:18 +02:00
|
|
|
~~~
|
|
|
|
!!! error TS2300: Duplicate identifier 'Foo'.
|
2014-07-13 01:04:16 +02:00
|
|
|
public set Foo(foo:string) {} // ok
|
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
2014-10-01 02:15:18 +02:00
|
|
|
~~~
|
|
|
|
!!! error TS2300: Duplicate identifier 'Foo'.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
public Foo = 0; // error - duplicate identifier Foo - confirmed
|
2014-10-01 20:27:20 +02:00
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'Foo'.
|
2014-07-13 01:04:16 +02:00
|
|
|
public get Goo(v:string):string {return null;} // error - getters must not have a parameter
|
|
|
|
~~~
|
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
|
|
|
public set Goo(v:string):string {} // error - setters must not specify a return type
|
|
|
|
~~~
|
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
|
|
|
}
|
|
|
|
|
|
|
|
class E {
|
|
|
|
private get Baz():number { return 0; }
|
|
|
|
~~~
|
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
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2379: Getter and setter accessors do not agree in visibility.
|
2014-07-13 01:04:16 +02:00
|
|
|
public set Baz(n:number) {} // error - accessors do not agree in visibility
|
|
|
|
~~~
|
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
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2379: Getter and setter accessors do not agree in visibility.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|