@@ -28,15 +28,11 @@ tests/cases/conformance/controlFlow/controlFlowAliasing.ts(232,13): error TS2322
28
28
Type 'number' is not assignable to type 'string'.
29
29
tests/cases/conformance/controlFlow/controlFlowAliasing.ts(233,13): error TS2322: Type 'string | number' is not assignable to type 'string'.
30
30
Type 'number' is not assignable to type 'string'.
31
- tests/cases/conformance/controlFlow/controlFlowAliasing.ts(267,13): error TS2322: Type 'string | number' is not assignable to type 'string'.
32
- Type 'number' is not assignable to type 'string'.
33
- tests/cases/conformance/controlFlow/controlFlowAliasing.ts(270,13): error TS2322: Type 'string | number' is not assignable to type 'number'.
34
- Type 'string' is not assignable to type 'number'.
35
31
tests/cases/conformance/controlFlow/controlFlowAliasing.ts(280,5): error TS2448: Block-scoped variable 'a' used before its declaration.
36
32
tests/cases/conformance/controlFlow/controlFlowAliasing.ts(280,5): error TS2454: Variable 'a' is used before being assigned.
37
33
38
34
39
- ==== tests/cases/conformance/controlFlow/controlFlowAliasing.ts (19 errors) ====
35
+ ==== tests/cases/conformance/controlFlow/controlFlowAliasing.ts (17 errors) ====
40
36
// Narrowing by aliased conditional expressions
41
37
42
38
function f10(x: string | number) {
@@ -349,15 +345,9 @@ tests/cases/conformance/controlFlow/controlFlowAliasing.ts(280,5): error TS2454:
349
345
function foo({ kind, payload }: Data) {
350
346
if (kind === 'str') {
351
347
let t: string = payload;
352
- ~
353
- !!! error TS2322: Type 'string | number' is not assignable to type 'string'.
354
- !!! error TS2322: Type 'number' is not assignable to type 'string'.
355
348
}
356
349
else {
357
350
let t: number = payload;
358
- ~
359
- !!! error TS2322: Type 'string | number' is not assignable to type 'number'.
360
- !!! error TS2322: Type 'string' is not assignable to type 'number'.
361
351
}
362
352
}
363
353
0 commit comments