VSCode displaying error markers for positional arguments

I’m using the awesome Julia mode in VSCode, thanks for that!

One slight issue however is that vscode seems to display incorrect error markers on some calls to functions with keyword arguments. Is it possible to get rid of that?

Examples:

function func1(x, y)
    return x + y
end

function func2(x; y=3)
    return x + y
end

function func3(x; y)
    return x + y
end

function func4(; x, y)
    return x + y
end

function example()
    a = func1(2, 3)
    b = func2(2)
    c = func3(2; y=3) # displays error markers in VS Code
    d = func4(x=2, y=3) # displays error markers in VS Code
end

It happens when the keyword arguments are defined without default values. It seems to be a bug, so may be worth to open an issue in the source repository: GitHub - julia-vscode/julia-vscode: Julia extension for Visual Studio Code

1 Like