Skip to content

Commit c468a25

Browse files
committed
Accept new baselines
1 parent 5c6a856 commit c468a25

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

tests/baselines/reference/controlFlowAliasing.errors.txt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,11 @@ tests/cases/conformance/controlFlow/controlFlowAliasing.ts(232,13): error TS2322
2828
Type 'number' is not assignable to type 'string'.
2929
tests/cases/conformance/controlFlow/controlFlowAliasing.ts(233,13): error TS2322: Type 'string | number' is not assignable to type 'string'.
3030
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'.
3531
tests/cases/conformance/controlFlow/controlFlowAliasing.ts(280,5): error TS2448: Block-scoped variable 'a' used before its declaration.
3632
tests/cases/conformance/controlFlow/controlFlowAliasing.ts(280,5): error TS2454: Variable 'a' is used before being assigned.
3733

3834

39-
==== tests/cases/conformance/controlFlow/controlFlowAliasing.ts (19 errors) ====
35+
==== tests/cases/conformance/controlFlow/controlFlowAliasing.ts (17 errors) ====
4036
// Narrowing by aliased conditional expressions
4137

4238
function f10(x: string | number) {
@@ -349,15 +345,9 @@ tests/cases/conformance/controlFlow/controlFlowAliasing.ts(280,5): error TS2454:
349345
function foo({ kind, payload }: Data) {
350346
if (kind === 'str') {
351347
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'.
355348
}
356349
else {
357350
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'.
361351
}
362352
}
363353

tests/baselines/reference/controlFlowAliasing.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,12 +888,12 @@ function foo({ kind, payload }: Data) {
888888

889889
let t: string = payload;
890890
>t : string
891-
>payload : string | number
891+
>payload : string
892892
}
893893
else {
894894
let t: number = payload;
895895
>t : number
896-
>payload : string | number
896+
>payload : number
897897
}
898898
}
899899

0 commit comments

Comments
 (0)