Skip to content

VSCode plugin shows last error instead of first error #4

@schorg

Description

@schorg

In a blech file, that contains errors, the IDE plugin is supposed to show only one error. Unfortunately, the plugin shows the last error instead of the first error.
This makes correcting errors difficult, because you cannot see what is the first error.

To Reproduce

function f() returns bool
    var x: bool
    if (X) then return true end
    if (X) return false end
end

The error is the undeclared identifier X which should be written x.

The compiler outputs the errors correctly one after another.

fjg@Mac-mini src % blechc issue_ide.blc            
error: the identifier 'X' has no declaration
 --> issue_ide.blc:4:9 [name resolution]

4 |     if (X) then return true end
  |         ^ no declaration found

error: the identifier 'X' has no declaration
 --> issue_ide.blc:5:9 [name resolution]

5 |     if (X) then return false end
  |         ^ no declaration found

The plugin indicates the last error.

Expected behaviour
The plugin should indicate the first error.

Context
Latest compiler and latest plugin is used.

Screenshot
Bildschirm­foto 2023-01-27 um 08 36 47

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions