Skip to content

Commit b611a51

Browse files
committed
Accept new baselines
1 parent 2ccc106 commit b611a51

File tree

4 files changed

+74
-37
lines changed

4 files changed

+74
-37
lines changed

tests/baselines/reference/readonlyArraysAndTuples.errors.txt

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(10,5): error TS2740: Type 'readonly string[]' is missing the following properties from type 'string[]': pop, push, reverse, shift, and 3 more.
2-
tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(12,5): error TS2740: Type 'readonly [string, string]' is missing the following properties from type 'string[]': pop, push, reverse, shift, and 3 more.
3-
tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(16,5): error TS2739: Type 'string[]' is missing the following properties from type '[string, string]': 0, 1
4-
tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(17,5): error TS2740: Type 'readonly string[]' is missing the following properties from type '[string, string]': 0, 1, pop, push, and 5 more.
5-
tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(18,5): error TS2740: Type 'readonly [string, string]' is missing the following properties from type '[string, string]': pop, push, reverse, shift, and 3 more.
6-
tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(19,5): error TS2739: Type 'string[]' is missing the following properties from type 'readonly [string, string]': 0, 1
7-
tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(20,5): error TS2739: Type 'readonly string[]' is missing the following properties from type 'readonly [string, string]': 0, 1
1+
tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(9,12): error TS1354: 'readonly' type modifier is only permitted on array and tuple types.
2+
tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(10,15): error TS1354: 'readonly' type modifier is only permitted on array and tuple types.
3+
tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(11,12): error TS1354: 'readonly' type modifier is only permitted on array and tuple types.
4+
tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(14,5): error TS2740: Type 'readonly string[]' is missing the following properties from type 'string[]': pop, push, reverse, shift, and 3 more.
5+
tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(16,5): error TS2740: Type 'readonly [string, string]' is missing the following properties from type 'string[]': pop, push, reverse, shift, and 3 more.
6+
tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(20,5): error TS2739: Type 'string[]' is missing the following properties from type '[string, string]': 0, 1
7+
tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(21,5): error TS2740: Type 'readonly string[]' is missing the following properties from type '[string, string]': 0, 1, pop, push, and 5 more.
8+
tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(22,5): error TS2740: Type 'readonly [string, string]' is missing the following properties from type '[string, string]': pop, push, reverse, shift, and 3 more.
9+
tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(23,5): error TS2739: Type 'string[]' is missing the following properties from type 'readonly [string, string]': 0, 1
10+
tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(24,5): error TS2739: Type 'readonly string[]' is missing the following properties from type 'readonly [string, string]': 0, 1
811

912

10-
==== tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts (7 errors) ====
13+
==== tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts (10 errors) ====
1114
type T10 = string[];
1215
type T11 = Array<string>;
1316
type T12 = readonly string[];
@@ -16,6 +19,16 @@ tests/cases/conformance/types/tuple/readonlyArraysAndTuples.ts(20,5): error TS27
1619
type T20 = [number, number];
1720
type T21 = readonly [number, number];
1821

22+
type T30 = readonly string; // Error
23+
~~~~~~~~
24+
!!! error TS1354: 'readonly' type modifier is only permitted on array and tuple types.
25+
type T31<T> = readonly T; // Error
26+
~~~~~~~~
27+
!!! error TS1354: 'readonly' type modifier is only permitted on array and tuple types.
28+
type T32 = readonly readonly string[]; // Error
29+
~~~~~~~~
30+
!!! error TS1354: 'readonly' type modifier is only permitted on array and tuple types.
31+
1932
function f1(ma: string[], ra: readonly string[], mt: [string, string], rt: readonly [string, string]) {
2033
ma = ra; // Error
2134
~~

tests/baselines/reference/readonlyArraysAndTuples.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ type T13 = ReadonlyArray<string>;
77
type T20 = [number, number];
88
type T21 = readonly [number, number];
99

10+
type T30 = readonly string; // Error
11+
type T31<T> = readonly T; // Error
12+
type T32 = readonly readonly string[]; // Error
13+
1014
function f1(ma: string[], ra: readonly string[], mt: [string, string], rt: readonly [string, string]) {
1115
ma = ra; // Error
1216
ma = mt;

tests/baselines/reference/readonlyArraysAndTuples.symbols

Lines changed: 40 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,59 +19,70 @@ type T20 = [number, number];
1919
type T21 = readonly [number, number];
2020
>T21 : Symbol(T21, Decl(readonlyArraysAndTuples.ts, 5, 28))
2121

22+
type T30 = readonly string; // Error
23+
>T30 : Symbol(T30, Decl(readonlyArraysAndTuples.ts, 6, 37))
24+
25+
type T31<T> = readonly T; // Error
26+
>T31 : Symbol(T31, Decl(readonlyArraysAndTuples.ts, 8, 27))
27+
>T : Symbol(T, Decl(readonlyArraysAndTuples.ts, 9, 9))
28+
>T : Symbol(T, Decl(readonlyArraysAndTuples.ts, 9, 9))
29+
30+
type T32 = readonly readonly string[]; // Error
31+
>T32 : Symbol(T32, Decl(readonlyArraysAndTuples.ts, 9, 25))
32+
2233
function f1(ma: string[], ra: readonly string[], mt: [string, string], rt: readonly [string, string]) {
23-
>f1 : Symbol(f1, Decl(readonlyArraysAndTuples.ts, 6, 37))
24-
>ma : Symbol(ma, Decl(readonlyArraysAndTuples.ts, 8, 12))
25-
>ra : Symbol(ra, Decl(readonlyArraysAndTuples.ts, 8, 25))
26-
>mt : Symbol(mt, Decl(readonlyArraysAndTuples.ts, 8, 48))
27-
>rt : Symbol(rt, Decl(readonlyArraysAndTuples.ts, 8, 70))
34+
>f1 : Symbol(f1, Decl(readonlyArraysAndTuples.ts, 10, 38))
35+
>ma : Symbol(ma, Decl(readonlyArraysAndTuples.ts, 12, 12))
36+
>ra : Symbol(ra, Decl(readonlyArraysAndTuples.ts, 12, 25))
37+
>mt : Symbol(mt, Decl(readonlyArraysAndTuples.ts, 12, 48))
38+
>rt : Symbol(rt, Decl(readonlyArraysAndTuples.ts, 12, 70))
2839

2940
ma = ra; // Error
30-
>ma : Symbol(ma, Decl(readonlyArraysAndTuples.ts, 8, 12))
31-
>ra : Symbol(ra, Decl(readonlyArraysAndTuples.ts, 8, 25))
41+
>ma : Symbol(ma, Decl(readonlyArraysAndTuples.ts, 12, 12))
42+
>ra : Symbol(ra, Decl(readonlyArraysAndTuples.ts, 12, 25))
3243

3344
ma = mt;
34-
>ma : Symbol(ma, Decl(readonlyArraysAndTuples.ts, 8, 12))
35-
>mt : Symbol(mt, Decl(readonlyArraysAndTuples.ts, 8, 48))
45+
>ma : Symbol(ma, Decl(readonlyArraysAndTuples.ts, 12, 12))
46+
>mt : Symbol(mt, Decl(readonlyArraysAndTuples.ts, 12, 48))
3647

3748
ma = rt; // Error
38-
>ma : Symbol(ma, Decl(readonlyArraysAndTuples.ts, 8, 12))
39-
>rt : Symbol(rt, Decl(readonlyArraysAndTuples.ts, 8, 70))
49+
>ma : Symbol(ma, Decl(readonlyArraysAndTuples.ts, 12, 12))
50+
>rt : Symbol(rt, Decl(readonlyArraysAndTuples.ts, 12, 70))
4051

4152
ra = ma;
42-
>ra : Symbol(ra, Decl(readonlyArraysAndTuples.ts, 8, 25))
43-
>ma : Symbol(ma, Decl(readonlyArraysAndTuples.ts, 8, 12))
53+
>ra : Symbol(ra, Decl(readonlyArraysAndTuples.ts, 12, 25))
54+
>ma : Symbol(ma, Decl(readonlyArraysAndTuples.ts, 12, 12))
4455

4556
ra = mt;
46-
>ra : Symbol(ra, Decl(readonlyArraysAndTuples.ts, 8, 25))
47-
>mt : Symbol(mt, Decl(readonlyArraysAndTuples.ts, 8, 48))
57+
>ra : Symbol(ra, Decl(readonlyArraysAndTuples.ts, 12, 25))
58+
>mt : Symbol(mt, Decl(readonlyArraysAndTuples.ts, 12, 48))
4859

4960
ra = rt;
50-
>ra : Symbol(ra, Decl(readonlyArraysAndTuples.ts, 8, 25))
51-
>rt : Symbol(rt, Decl(readonlyArraysAndTuples.ts, 8, 70))
61+
>ra : Symbol(ra, Decl(readonlyArraysAndTuples.ts, 12, 25))
62+
>rt : Symbol(rt, Decl(readonlyArraysAndTuples.ts, 12, 70))
5263

5364
mt = ma; // Error
54-
>mt : Symbol(mt, Decl(readonlyArraysAndTuples.ts, 8, 48))
55-
>ma : Symbol(ma, Decl(readonlyArraysAndTuples.ts, 8, 12))
65+
>mt : Symbol(mt, Decl(readonlyArraysAndTuples.ts, 12, 48))
66+
>ma : Symbol(ma, Decl(readonlyArraysAndTuples.ts, 12, 12))
5667

5768
mt = ra; // Error
58-
>mt : Symbol(mt, Decl(readonlyArraysAndTuples.ts, 8, 48))
59-
>ra : Symbol(ra, Decl(readonlyArraysAndTuples.ts, 8, 25))
69+
>mt : Symbol(mt, Decl(readonlyArraysAndTuples.ts, 12, 48))
70+
>ra : Symbol(ra, Decl(readonlyArraysAndTuples.ts, 12, 25))
6071

6172
mt = rt; // Error
62-
>mt : Symbol(mt, Decl(readonlyArraysAndTuples.ts, 8, 48))
63-
>rt : Symbol(rt, Decl(readonlyArraysAndTuples.ts, 8, 70))
73+
>mt : Symbol(mt, Decl(readonlyArraysAndTuples.ts, 12, 48))
74+
>rt : Symbol(rt, Decl(readonlyArraysAndTuples.ts, 12, 70))
6475

6576
rt = ma; // Error
66-
>rt : Symbol(rt, Decl(readonlyArraysAndTuples.ts, 8, 70))
67-
>ma : Symbol(ma, Decl(readonlyArraysAndTuples.ts, 8, 12))
77+
>rt : Symbol(rt, Decl(readonlyArraysAndTuples.ts, 12, 70))
78+
>ma : Symbol(ma, Decl(readonlyArraysAndTuples.ts, 12, 12))
6879

6980
rt = ra; // Error
70-
>rt : Symbol(rt, Decl(readonlyArraysAndTuples.ts, 8, 70))
71-
>ra : Symbol(ra, Decl(readonlyArraysAndTuples.ts, 8, 25))
81+
>rt : Symbol(rt, Decl(readonlyArraysAndTuples.ts, 12, 70))
82+
>ra : Symbol(ra, Decl(readonlyArraysAndTuples.ts, 12, 25))
7283

7384
rt = mt;
74-
>rt : Symbol(rt, Decl(readonlyArraysAndTuples.ts, 8, 70))
75-
>mt : Symbol(mt, Decl(readonlyArraysAndTuples.ts, 8, 48))
85+
>rt : Symbol(rt, Decl(readonlyArraysAndTuples.ts, 12, 70))
86+
>mt : Symbol(mt, Decl(readonlyArraysAndTuples.ts, 12, 48))
7687
}
7788

tests/baselines/reference/readonlyArraysAndTuples.types

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ type T20 = [number, number];
1717
type T21 = readonly [number, number];
1818
>T21 : readonly [number, number]
1919

20+
type T30 = readonly string; // Error
21+
>T30 : string
22+
23+
type T31<T> = readonly T; // Error
24+
>T31 : T
25+
26+
type T32 = readonly readonly string[]; // Error
27+
>T32 : readonly string[]
28+
2029
function f1(ma: string[], ra: readonly string[], mt: [string, string], rt: readonly [string, string]) {
2130
>f1 : (ma: string[], ra: readonly string[], mt: [string, string], rt: readonly [string, string]) => void
2231
>ma : string[]

0 commit comments

Comments
 (0)