Skip to content

Missing compiler warning on if-clause #5109

Closed
@HJoost

Description

@HJoost

Hi,

last week I made a mistake while typing an if-clause:

if(x === false);
{...}

When I debugged it, the code inside the brackets got hit every time. For many code runs I did not see the wrong semicolon after the if-statement.

For me, a compiler warning about the misplaced semicolon would be great, like the C# compiler does it.

Helmut

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedA PR has been merged for this issueGood First IssueWell scoped, documented and has the green lightHelp WantedYou can do thisSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions