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

68 lines
5.4 KiB
Diff

--- old.readonlyTupleAndArrayElaboration.errors.txt
+++ new.readonlyTupleAndArrayElaboration.errors.txt
@@= skipped -0, +0 lines =@@
-readonlyTupleAndArrayElaboration.ts(10,20): error TS2345: Argument of type 'readonly [3, 4]' is not assignable to parameter of type '[number, number]'.
- The type 'readonly [3, 4]' is 'readonly' and cannot be assigned to the mutable type '[number, number]'.
-readonlyTupleAndArrayElaboration.ts(13,8): error TS2345: Argument of type 'readonly [3, 4]' is not assignable to parameter of type 'number[]'.
- The type 'readonly [3, 4]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
-readonlyTupleAndArrayElaboration.ts(16,9): error TS2345: Argument of type 'readonly [3, 4]' is not assignable to parameter of type 'number[]'.
- The type 'readonly [3, 4]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
-readonlyTupleAndArrayElaboration.ts(22,9): error TS2345: Argument of type 'readonly number[]' is not assignable to parameter of type 'number[]'.
- The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
-readonlyTupleAndArrayElaboration.ts(23,9): error TS2345: Argument of type 'readonly number[]' is not assignable to parameter of type 'number[]'.
- The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
-readonlyTupleAndArrayElaboration.ts(24,9): error TS2345: Argument of type 'readonly number[]' is not assignable to parameter of type 'number[]'.
- The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
+readonlyTupleAndArrayElaboration.ts(10,20): error TS4104: The type 'readonly [3, 4]' is 'readonly' and cannot be assigned to the mutable type '[number, number]'.
+readonlyTupleAndArrayElaboration.ts(13,8): error TS4104: The type 'readonly [3, 4]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
+readonlyTupleAndArrayElaboration.ts(16,9): error TS4104: The type 'readonly [3, 4]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
+readonlyTupleAndArrayElaboration.ts(22,9): error TS4104: The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
+readonlyTupleAndArrayElaboration.ts(23,9): error TS4104: The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
+readonlyTupleAndArrayElaboration.ts(24,9): error TS4104: The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
readonlyTupleAndArrayElaboration.ts(27,7): error TS2322: Type 'readonly [1]' is not assignable to type 'readonly []'.
Source has 1 element(s) but target allows only 0.
readonlyTupleAndArrayElaboration.ts(30,7): error TS4104: The type 'readonly [1]' is 'readonly' and cannot be assigned to the mutable type '[]'.
@@= skipped -51, +45 lines =@@
distanceFromOrigin(point);
~~~~~
-!!! error TS2345: Argument of type 'readonly [3, 4]' is not assignable to parameter of type '[number, number]'.
-!!! error TS2345: The type 'readonly [3, 4]' is 'readonly' and cannot be assigned to the mutable type '[number, number]'.
+!!! error TS4104: The type 'readonly [3, 4]' is 'readonly' and cannot be assigned to the mutable type '[number, number]'.
declare function arryFn(x: number[]): void;
arryFn(point);
~~~~~
-!!! error TS2345: Argument of type 'readonly [3, 4]' is not assignable to parameter of type 'number[]'.
-!!! error TS2345: The type 'readonly [3, 4]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
+!!! error TS4104: The type 'readonly [3, 4]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
declare function arryFn2(x: Array<number>): void;
arryFn2(point);
~~~~~
-!!! error TS2345: Argument of type 'readonly [3, 4]' is not assignable to parameter of type 'number[]'.
-!!! error TS2345: The type 'readonly [3, 4]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
+!!! error TS4104: The type 'readonly [3, 4]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
declare const a: readonly number[];
declare const b: Readonly<number[]>;
@@= skipped -21, +18 lines =@@
arryFn2(a);
~
-!!! error TS2345: Argument of type 'readonly number[]' is not assignable to parameter of type 'number[]'.
-!!! error TS2345: The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
+!!! error TS4104: The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
arryFn2(b);
~
-!!! error TS2345: Argument of type 'readonly number[]' is not assignable to parameter of type 'number[]'.
-!!! error TS2345: The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
+!!! error TS4104: The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
arryFn2(c);
~
-!!! error TS2345: Argument of type 'readonly number[]' is not assignable to parameter of type 'number[]'.
-!!! error TS2345: The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
+!!! error TS4104: The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
const t1: readonly [1] = [1];
const t2: readonly [] = t1;