TypeScript/tests/baselines/reference/gettersAndSettersErrors.errors.txt
Cyrus Najmabadi f1a2e41a8a Sort diagnostics in our baseline output.
This was we don't get noisy baselines just because a different phase of the compiler reported
the diagnostic.

This helps with Yui's refactoring work to move grammar checks into the type checker.
2014-12-16 15:56:56 -08:00

52 lines
3 KiB
Plaintext

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