Pure-D / serve-d

D LSP server (dlang language server protocol server)
MIT License
200 stars 48 forks source link

function overload resolution is not accurate enough #221

Open electricface opened 2 years ago

electricface commented 2 years ago

dcd-server --version v0.13.6 serve-d v0.7.4 with workspace-d v3.7.0

WebFreak001 commented 2 years ago

can you explain your issue?

electricface commented 2 years ago

Can't jump to the correct function in VSCode

WebFreak001 commented 2 years ago

can you share some code where you have an issue?

please list all different kinds of stuff your are having issues with.

Known issues: CTFE doesn't work, mixins don't work, templates might not work

electricface commented 2 years ago
import std.stdio;

void info(double number)
{
    writeln("Floating point: ", number);
}

void info(int number)
{
    writeln("Integer       : ", number);
}

void info(string str)
{
    writeln("String        : ", str);
}

void main()
{
    info(1.2);
    info(3);
    info("hello");
}

move the mouse over "info(1.2)", right click, and click "Go to definition" in the pop-up menu, it will jump to void info(double number). move the mouse over "info(3)", right click, and click "Go to definition" in the pop-up menu, it will jump to void info(double number). move the mouse over 'info("hello")', right click, and click "Go to definition" in the pop-up menu, it will jump to void info(double number).