Skip to content

Unmatched Parenthesis parse errors outside expressions are not always reported #38

@MTDL9

Description

@MTDL9

There are some parse errors, caused by unmatched parenthesis or braces outside expressions, that are not reported by the server diagnostics.

For example starting with this valid file:

fun main(args: Array<out String>) {
    println("Hello World!")
}

If an open parenthesis, closed parenthesis or closed brace is added at the end of the file, no error is reported. For example adding these characters triggers no errors:

fun main(args: Array<out String>) {
    println("Hello World!")
}
()}[]

With open braces instead an error is correctly reported at the start of the line

fun main(args: Array<out String>) {
    println("Hello World!")
}
{}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdiagnosticsLinting

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions