From @alexandrudima on January 27, 2016 10:45
Testing #2218
function xx() {
if (true) {
return 5;
} else {
return '5';
}
}
This shows a squiggly on the second return saying 'Unreachable code detected'.
The following or any other const expression does not:
function xx() {
if (true || true) {
return 5;
} else {
return '5';
}
}
same with if (!false) or if (!true), etc.
Copied from original issue: microsoft/vscode#2430
From @alexandrudima on January 27, 2016 10:45
Testing #2218
This shows a squiggly on the second return saying 'Unreachable code detected'.
The following or any other const expression does not:
same with
if (!false)orif (!true), etc.Copied from original issue: microsoft/vscode#2430