This commit is contained in:
Andy 2018-11-19 10:54:54 -08:00 committed by Nathan Shively-Sanders
parent b3b927291f
commit ca7f78b8df
6 changed files with 38 additions and 38 deletions

View File

@ -1,13 +1,13 @@
tests/cases/compiler/unusedSwitchStatment.ts(2,10): error TS2678: Type '0' is not comparable to type '1'.
tests/cases/compiler/unusedSwitchStatment.ts(3,13): error TS6133: 'x' is declared but its value is never read.
tests/cases/compiler/unusedSwitchStatment.ts(6,15): error TS6133: 'c' is declared but its value is never read.
tests/cases/compiler/unusedSwitchStatment.ts(9,13): error TS6133: 'z' is declared but its value is never read.
tests/cases/compiler/unusedSwitchStatment.ts(14,10): error TS2678: Type '0' is not comparable to type '2'.
tests/cases/compiler/unusedSwitchStatment.ts(15,13): error TS6133: 'x' is declared but its value is never read.
tests/cases/compiler/unusedSwitchStatment.ts(16,10): error TS2678: Type '1' is not comparable to type '2'.
tests/cases/compiler/unusedSwitchStatement.ts(2,10): error TS2678: Type '0' is not comparable to type '1'.
tests/cases/compiler/unusedSwitchStatement.ts(3,13): error TS6133: 'x' is declared but its value is never read.
tests/cases/compiler/unusedSwitchStatement.ts(6,15): error TS6133: 'c' is declared but its value is never read.
tests/cases/compiler/unusedSwitchStatement.ts(9,13): error TS6133: 'z' is declared but its value is never read.
tests/cases/compiler/unusedSwitchStatement.ts(14,10): error TS2678: Type '0' is not comparable to type '2'.
tests/cases/compiler/unusedSwitchStatement.ts(15,13): error TS6133: 'x' is declared but its value is never read.
tests/cases/compiler/unusedSwitchStatement.ts(16,10): error TS2678: Type '1' is not comparable to type '2'.
==== tests/cases/compiler/unusedSwitchStatment.ts (7 errors) ====
==== tests/cases/compiler/unusedSwitchStatement.ts (7 errors) ====
switch (1) {
case 0:
~

View File

@ -1,4 +1,4 @@
//// [unusedSwitchStatment.ts]
//// [unusedSwitchStatement.ts]
switch (1) {
case 0:
let x;
@ -18,7 +18,7 @@ switch (2) {
x++;
}
//// [unusedSwitchStatment.js]
//// [unusedSwitchStatement.js]
switch (1) {
case 0:
var x = void 0;

View File

@ -0,0 +1,27 @@
=== tests/cases/compiler/unusedSwitchStatement.ts ===
switch (1) {
case 0:
let x;
>x : Symbol(x, Decl(unusedSwitchStatement.ts, 2, 11))
break;
case 1:
const c = 1;
>c : Symbol(c, Decl(unusedSwitchStatement.ts, 5, 13))
break;
default:
let z = 2;
>z : Symbol(z, Decl(unusedSwitchStatement.ts, 8, 11))
}
switch (2) {
case 0:
let x;
>x : Symbol(x, Decl(unusedSwitchStatement.ts, 14, 11))
case 1:
x++;
>x : Symbol(x, Decl(unusedSwitchStatement.ts, 14, 11))
}

View File

@ -1,4 +1,4 @@
=== tests/cases/compiler/unusedSwitchStatment.ts ===
=== tests/cases/compiler/unusedSwitchStatement.ts ===
switch (1) {
>1 : 1

View File

@ -1,27 +0,0 @@
=== tests/cases/compiler/unusedSwitchStatment.ts ===
switch (1) {
case 0:
let x;
>x : Symbol(x, Decl(unusedSwitchStatment.ts, 2, 11))
break;
case 1:
const c = 1;
>c : Symbol(c, Decl(unusedSwitchStatment.ts, 5, 13))
break;
default:
let z = 2;
>z : Symbol(z, Decl(unusedSwitchStatment.ts, 8, 11))
}
switch (2) {
case 0:
let x;
>x : Symbol(x, Decl(unusedSwitchStatment.ts, 14, 11))
case 1:
x++;
>x : Symbol(x, Decl(unusedSwitchStatment.ts, 14, 11))
}