TypeScript/tests/cases/conformance/controlFlow/switchWithConstrainedTypeVariable.ts
2017-12-23 19:28:13 -08:00

15 lines
230 B
TypeScript

// @strict: true
// Repro from #20840
function function1<T extends 'a' | 'b'>(key: T) {
switch (key) {
case 'a':
key.toLowerCase();
break;
default:
key.toLowerCase();
break;
}
}