You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type '{ x: number; }' is not assignable to type 'BrandB'.
9
9
tests/cases/conformance/types/structuralTags/structuralTagTypesControlFlow.ts(38,27): error TS2345: Argument of type '{ x: number; }' is not assignable to parameter of type 'tag ({ BrandA: void; } & { BrandB: void; })'.
10
10
tests/cases/conformance/types/structuralTags/structuralTagTypesControlFlow.ts(64,29): error TS2345: Argument of type '"/a/b/c" & tag { NormalizedPath: void; }' is not assignable to parameter of type 'AbsolutePath'.
11
-
Type '"/a/b/c"' is not assignable to type 'AbsolutePath'.
12
-
Type '"/a/b/c"' is not assignable to type 'tag { AbsolutePath: void; }'.
13
-
Type '"/a/b/c" & tag { NormalizedPath: void; }' is not assignable to type 'tag { AbsolutePath: void; }'.
14
-
Type '"/a/b/c"' is not assignable to type 'tag { AbsolutePath: void; }'.
11
+
Type '"/a/b/c" & tag { NormalizedPath: void; }' is not assignable to type 'tag { AbsolutePath: void; }'.
15
12
tests/cases/conformance/types/structuralTags/structuralTagTypesControlFlow.ts(66,39): error TS2345: Argument of type '"/a/b/c" & tag { NormalizedPath: void; }' is not assignable to parameter of type 'NormalizedAbsolutePath'.
16
-
Type '"/a/b/c"' is not assignable to type 'NormalizedAbsolutePath'.
17
-
Type '"/a/b/c"' is not assignable to type 'tag ({ NormalizedPath: void; } & { AbsolutePath: void; })'.
18
-
Type '"/a/b/c" & tag { NormalizedPath: void; }' is not assignable to type 'tag ({ NormalizedPath: void; } & { AbsolutePath: void; })'.
19
-
Type '"/a/b/c"' is not assignable to type 'tag ({ NormalizedPath: void; } & { AbsolutePath: void; })'.
13
+
Type '"/a/b/c" & tag { NormalizedPath: void; }' is not assignable to type 'tag ({ NormalizedPath: void; } & { AbsolutePath: void; })'.
20
14
tests/cases/conformance/types/structuralTags/structuralTagTypesControlFlow.ts(71,31): error TS2345: Argument of type '"/a/b/c" & tag { AbsolutePath: void; }' is not assignable to parameter of type 'NormalizedPath'.
21
-
Type '"/a/b/c"' is not assignable to type 'NormalizedPath'.
22
-
Type '"/a/b/c"' is not assignable to type 'tag { NormalizedPath: void; }'.
23
-
Type '"/a/b/c" & tag { AbsolutePath: void; }' is not assignable to type 'tag { NormalizedPath: void; }'.
24
-
Type '"/a/b/c"' is not assignable to type 'tag { NormalizedPath: void; }'.
15
+
Type '"/a/b/c" & tag { AbsolutePath: void; }' is not assignable to type 'tag { NormalizedPath: void; }'.
25
16
tests/cases/conformance/types/structuralTags/structuralTagTypesControlFlow.ts(74,39): error TS2345: Argument of type '"/a/b/c" & tag { AbsolutePath: void; }' is not assignable to parameter of type 'NormalizedAbsolutePath'.
26
-
Type '"/a/b/c"' is not assignable to type 'NormalizedAbsolutePath'.
27
-
Type '"/a/b/c"' is not assignable to type 'tag ({ NormalizedPath: void; } & { AbsolutePath: void; })'.
28
-
Type '"/a/b/c" & tag { AbsolutePath: void; }' is not assignable to type 'tag ({ NormalizedPath: void; } & { AbsolutePath: void; })'.
29
-
Type '"/a/b/c"' is not assignable to type 'tag ({ NormalizedPath: void; } & { AbsolutePath: void; })'.
17
+
Type '"/a/b/c" & tag { AbsolutePath: void; }' is not assignable to type 'tag ({ NormalizedPath: void; } & { AbsolutePath: void; })'.
30
18
tests/cases/conformance/types/structuralTags/structuralTagTypesControlFlow.ts(77,31): error TS2345: Argument of type '"/a/b/c"' is not assignable to parameter of type 'NormalizedPath'.
31
19
Type '"/a/b/c"' is not assignable to type 'tag { NormalizedPath: void; }'.
32
20
tests/cases/conformance/types/structuralTags/structuralTagTypesControlFlow.ts(78,29): error TS2345: Argument of type '"/a/b/c"' is not assignable to parameter of type 'AbsolutePath'.
!!! error TS2345: Argument of type '"/a/b/c" & tag { NormalizedPath: void; }' is not assignable to parameter of type 'AbsolutePath'.
123
-
!!! error TS2345: Type '"/a/b/c"' is not assignable to type 'AbsolutePath'.
124
-
!!! error TS2345: Type '"/a/b/c"' is not assignable to type 'tag { AbsolutePath: void; }'.
125
-
!!! error TS2345: Type '"/a/b/c" & tag { NormalizedPath: void; }' is not assignable to type 'tag { AbsolutePath: void; }'.
126
-
!!! error TS2345: Type '"/a/b/c"' is not assignable to type 'tag { AbsolutePath: void; }'.
111
+
!!! error TS2345: Type '"/a/b/c" & tag { NormalizedPath: void; }' is not assignable to type 'tag { AbsolutePath: void; }'.
127
112
consumeNormalizedOrAbsolutePath(p);
128
113
consumeNormalizedAbsolutePath(p); // err
129
114
~
130
115
!!! error TS2345: Argument of type '"/a/b/c" & tag { NormalizedPath: void; }' is not assignable to parameter of type 'NormalizedAbsolutePath'.
131
-
!!! error TS2345: Type '"/a/b/c"' is not assignable to type 'NormalizedAbsolutePath'.
132
-
!!! error TS2345: Type '"/a/b/c"' is not assignable to type 'tag ({ NormalizedPath: void; } & { AbsolutePath: void; })'.
133
-
!!! error TS2345: Type '"/a/b/c" & tag { NormalizedPath: void; }' is not assignable to type 'tag ({ NormalizedPath: void; } & { AbsolutePath: void; })'.
134
-
!!! error TS2345: Type '"/a/b/c"' is not assignable to type 'tag ({ NormalizedPath: void; } & { AbsolutePath: void; })'.
116
+
!!! error TS2345: Type '"/a/b/c" & tag { NormalizedPath: void; }' is not assignable to type 'tag ({ NormalizedPath: void; } & { AbsolutePath: void; })'.
135
117
}
136
118
}
137
119
else {
138
120
if (isAbsolutePath(p)) {
139
121
consumeNormalizedPath(p); // err
140
122
~
141
123
!!! error TS2345: Argument of type '"/a/b/c" & tag { AbsolutePath: void; }' is not assignable to parameter of type 'NormalizedPath'.
142
-
!!! error TS2345: Type '"/a/b/c"' is not assignable to type 'NormalizedPath'.
143
-
!!! error TS2345: Type '"/a/b/c"' is not assignable to type 'tag { NormalizedPath: void; }'.
144
-
!!! error TS2345: Type '"/a/b/c" & tag { AbsolutePath: void; }' is not assignable to type 'tag { NormalizedPath: void; }'.
145
-
!!! error TS2345: Type '"/a/b/c"' is not assignable to type 'tag { NormalizedPath: void; }'.
124
+
!!! error TS2345: Type '"/a/b/c" & tag { AbsolutePath: void; }' is not assignable to type 'tag { NormalizedPath: void; }'.
146
125
consumeAbsolutePath(p);
147
126
consumeNormalizedOrAbsolutePath(p);
148
127
consumeNormalizedAbsolutePath(p); // err
149
128
~
150
129
!!! error TS2345: Argument of type '"/a/b/c" & tag { AbsolutePath: void; }' is not assignable to parameter of type 'NormalizedAbsolutePath'.
151
-
!!! error TS2345: Type '"/a/b/c"' is not assignable to type 'NormalizedAbsolutePath'.
152
-
!!! error TS2345: Type '"/a/b/c"' is not assignable to type 'tag ({ NormalizedPath: void; } & { AbsolutePath: void; })'.
153
-
!!! error TS2345: Type '"/a/b/c" & tag { AbsolutePath: void; }' is not assignable to type 'tag ({ NormalizedPath: void; } & { AbsolutePath: void; })'.
154
-
!!! error TS2345: Type '"/a/b/c"' is not assignable to type 'tag ({ NormalizedPath: void; } & { AbsolutePath: void; })'.
130
+
!!! error TS2345: Type '"/a/b/c" & tag { AbsolutePath: void; }' is not assignable to type 'tag ({ NormalizedPath: void; } & { AbsolutePath: void; })'.
Copy file name to clipboardExpand all lines: tests/baselines/reference/structuralTagTypesErr1.errors.txt
+4-16Lines changed: 4 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,7 @@
1
1
tests/cases/conformance/types/structuralTags/structuralTagTypesErr1.ts(18,1): error TS2322: Type 'number & tag { y: any; }' is not assignable to type 'number & tag { x: any; }'.
2
-
Type 'number' is not assignable to type 'number & tag { x: any; }'.
3
-
Type 'number' is not assignable to type 'tag { x: any; }'.
4
-
Type 'number & tag { y: any; }' is not assignable to type 'tag { x: any; }'.
5
-
Type 'number' is not assignable to type 'tag { x: any; }'.
2
+
Type 'number & tag { y: any; }' is not assignable to type 'tag { x: any; }'.
6
3
tests/cases/conformance/types/structuralTags/structuralTagTypesErr1.ts(19,1): error TS2322: Type 'number & tag { x: any; }' is not assignable to type 'number & tag { y: any; }'.
7
-
Type 'number' is not assignable to type 'number & tag { y: any; }'.
8
-
Type 'number' is not assignable to type 'tag { y: any; }'.
9
-
Type 'number & tag { x: any; }' is not assignable to type 'tag { y: any; }'.
10
-
Type 'number' is not assignable to type 'tag { y: any; }'.
4
+
Type 'number & tag { x: any; }' is not assignable to type 'tag { y: any; }'.
11
5
tests/cases/conformance/types/structuralTags/structuralTagTypesErr1.ts(21,1): error TS2322: Type 'number' is not assignable to type 'number & tag { x: any; }'.
12
6
Type 'number' is not assignable to type 'tag { x: any; }'.
13
7
tests/cases/conformance/types/structuralTags/structuralTagTypesErr1.ts(22,1): error TS2322: Type 'number' is not assignable to type 'number & tag { y: any; }'.
@@ -39,17 +33,11 @@ tests/cases/conformance/types/structuralTags/structuralTagTypesErr1.ts(25,1): er
39
33
a.x = a.y; // err
40
34
~~~
41
35
!!! error TS2322: Type 'number & tag { y: any; }' is not assignable to type 'number & tag { x: any; }'.
42
-
!!! error TS2322: Type 'number' is not assignable to type 'number & tag { x: any; }'.
43
-
!!! error TS2322: Type 'number' is not assignable to type 'tag { x: any; }'.
44
-
!!! error TS2322: Type 'number & tag { y: any; }' is not assignable to type 'tag { x: any; }'.
45
-
!!! error TS2322: Type 'number' is not assignable to type 'tag { x: any; }'.
36
+
!!! error TS2322: Type 'number & tag { y: any; }' is not assignable to type 'tag { x: any; }'.
46
37
a.y = a.x; // err
47
38
~~~
48
39
!!! error TS2322: Type 'number & tag { x: any; }' is not assignable to type 'number & tag { y: any; }'.
49
-
!!! error TS2322: Type 'number' is not assignable to type 'number & tag { y: any; }'.
50
-
!!! error TS2322: Type 'number' is not assignable to type 'tag { y: any; }'.
51
-
!!! error TS2322: Type 'number & tag { x: any; }' is not assignable to type 'tag { y: any; }'.
52
-
!!! error TS2322: Type 'number' is not assignable to type 'tag { y: any; }'.
40
+
!!! error TS2322: Type 'number & tag { x: any; }' is not assignable to type 'tag { y: any; }'.
0 commit comments