-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: check: Control FlowThe issue relates to control flow analysisThe issue relates to control flow analysis
Milestone
Description
🔎 Search Terms
In case, only the first unreachable statement is flagged. This is inconsistent e.g. with function scope.
🕗 Version & Regression Information
Reproduces on 5.2.2 and nightly.
⏯ Playground Link
See Playground
💻 Code
function g() {
switch ("a") {
case "a":
return;
console.log("a"); // grayed out
console.log("a"); // not grayed out
}
}🙁 Actual behavior
First statement grayed out.
🙂 Expected behavior
Both statements grayed out.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: check: Control FlowThe issue relates to control flow analysisThe issue relates to control flow analysis