Files
tsgo/testdata/baselines/reference/submoduleAccepted/compiler/gettersAndSettersErrors.errors.txt.diff

24 lines
1.2 KiB
Diff

--- old.gettersAndSettersErrors.errors.txt
+++ new.gettersAndSettersErrors.errors.txt
@@= skipped -0, +0 lines =@@
+gettersAndSettersErrors.ts(2,16): error TS2300: Duplicate identifier 'Foo'.
+gettersAndSettersErrors.ts(3,16): error TS2300: Duplicate identifier 'Foo'.
gettersAndSettersErrors.ts(5,12): error TS2300: Duplicate identifier 'Foo'.
gettersAndSettersErrors.ts(5,12): error TS2717: Subsequent property declarations must have the same type. Property 'Foo' must be of type 'string', but here has type 'number'.
gettersAndSettersErrors.ts(6,16): error TS1054: A 'get' accessor cannot have parameters.
@@= skipped -6, +8 lines =@@
gettersAndSettersErrors.ts(12,16): error TS2808: A get accessor must be at least as accessible as the setter
-==== gettersAndSettersErrors.ts (7 errors) ====
+==== gettersAndSettersErrors.ts (9 errors) ====
class C {
public get Foo() { return "foo";} // ok
+ ~~~
+!!! error TS2300: Duplicate identifier 'Foo'.
public set Foo(foo:string) {} // ok
+ ~~~
+!!! error TS2300: Duplicate identifier 'Foo'.
public Foo = 0; // error - duplicate identifier Foo - confirmed
~~~