-
Notifications
You must be signed in to change notification settings - Fork 179
Open
Description
Related #318
sometest.ts
let one: number | undefined;
mainLoop: for (;;) {
let two: number | undefined;
for (;;) {
if (one === 10) {
break mainLoop;
}
if (two === 10) {
break;
}
two = (two ?? 0) + 1;
}
one = (one ?? 0) + 1;
console.log(one);
}
console.log("fnished!");deno .\sometest.ts
1
2
3
4
5
6
7
8
9
10
fnished!deno lint .\sometest.ts
error[no-unreachable]: This statement is unreachable
--> C:\Users\anon\search_state\sometest.ts:16:3
|
16 | one = (one ?? 0) + 1;
| ^^^^^^^^^^^^^^^^^^^^^
docs: https://lint.deno.land/rules/no-unreachable
error[no-unreachable]: This statement is unreachable
--> C:\Users\anon\search_state\sometest.ts:17:3
|
17 | console.log(one);
| ^^^^^^^^^^^^^^^^^
docs: https://lint.deno.land/rules/no-unreachable
Found 2 problems
Checked 1 fileMetadata
Metadata
Assignees
Labels
No labels