Skip to content

Salsa unreachable code detected is not so smart #6665

Closed
@egamma

Description

@egamma

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

Metadata

Metadata

Assignees

Labels

By DesignDeprecated - use "Working as Intended" or "Design Limitation" instead

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions