Skip to content

Commit 357d58b

Browse files
committed
Update baselines
1 parent d7f5fc8 commit 357d58b

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
tests/cases/compiler/switchCasesExpressionTypeMismatch.ts(4,10): error TS2678: Type 'typeof Foo' is not comparable to type 'number'.
2-
tests/cases/compiler/switchCasesExpressionTypeMismatch.ts(5,10): error TS2678: Type 'string' is not comparable to type 'number'.
3-
tests/cases/compiler/switchCasesExpressionTypeMismatch.ts(7,10): error TS2678: Type 'boolean' is not comparable to type 'number'.
2+
tests/cases/compiler/switchCasesExpressionTypeMismatch.ts(5,10): error TS2678: Type '"sss"' is not comparable to type '0'.
3+
tests/cases/compiler/switchCasesExpressionTypeMismatch.ts(6,10): error TS2678: Type '123' is not comparable to type '0'.
4+
tests/cases/compiler/switchCasesExpressionTypeMismatch.ts(7,10): error TS2678: Type 'true' is not comparable to type '0'.
45

56

6-
==== tests/cases/compiler/switchCasesExpressionTypeMismatch.ts (3 errors) ====
7+
==== tests/cases/compiler/switchCasesExpressionTypeMismatch.ts (4 errors) ====
78
class Foo { }
89

910
switch (0) {
@@ -12,11 +13,13 @@ tests/cases/compiler/switchCasesExpressionTypeMismatch.ts(7,10): error TS2678: T
1213
!!! error TS2678: Type 'typeof Foo' is not comparable to type 'number'.
1314
case "sss": break; // Error
1415
~~~~~
15-
!!! error TS2678: Type 'string' is not comparable to type 'number'.
16-
case 123: break; // No Error
16+
!!! error TS2678: Type '"sss"' is not comparable to type '0'.
17+
case 123: break; // Error
18+
~~~
19+
!!! error TS2678: Type '123' is not comparable to type '0'.
1720
case true: break; // Error
1821
~~~~
19-
!!! error TS2678: Type 'boolean' is not comparable to type 'number'.
22+
!!! error TS2678: Type 'true' is not comparable to type '0'.
2023
}
2124

2225
var s: any = 0;
@@ -27,4 +30,5 @@ tests/cases/compiler/switchCasesExpressionTypeMismatch.ts(7,10): error TS2678: T
2730
case "sss": break;
2831
case 123: break;
2932
case true: break;
30-
}
33+
}
34+

tests/baselines/reference/switchCasesExpressionTypeMismatch.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class Foo { }
44
switch (0) {
55
case Foo: break; // Error
66
case "sss": break; // Error
7-
case 123: break; // No Error
7+
case 123: break; // Error
88
case true: break; // Error
99
}
1010

@@ -16,7 +16,8 @@ switch (s) {
1616
case "sss": break;
1717
case 123: break;
1818
case true: break;
19-
}
19+
}
20+
2021

2122
//// [switchCasesExpressionTypeMismatch.js]
2223
var Foo = (function () {
@@ -27,7 +28,7 @@ var Foo = (function () {
2728
switch (0) {
2829
case Foo: break; // Error
2930
case "sss": break; // Error
30-
case 123: break; // No Error
31+
case 123: break; // Error
3132
case true: break; // Error
3233
}
3334
var s = 0;

0 commit comments

Comments
 (0)