pherrymason / c3-lsp

Language Server for C3 Language
https://pherrymason.github.io/c3-lsp/
GNU General Public License v3.0
75 stars 10 forks source link

Once an error is detected, it does not disappear once the error is resolved #59

Closed joshring closed 3 months ago

joshring commented 3 months ago

Describe the bug Once an error is detected, it does not disappear once the error is resolved

To Reproduce Example code

module test1;
import std::io;

fn int! example_fn()
{
    // comment out this part to see the error will still remain
    defer (try err) { // error in this part
        io::printf("enterring defer try\n");
        // io::printf("value: %s\n", value);
        io::printf("exiting defer try\n");
    }                                                                                      

    // return io::IoError.FILE_NOT_FOUND?;
    return 2;
}                                                               

fn void! main()
{
    int !res = example_fn()!;
    if(try res) {
        io::printf("res :%d\n", res);
    }
    return;
}

then comment out the defer (try err) but the error highlighting will remain even after commenting out

Expected behavior Expected the error highlighting to be removed once the, part having the error was commented out

Screenshots image

Desktop (please complete the following information):

Additional context Add any other context about the problem here.