code-d
code-d copied to clipboard
Hover information not working with UFCS
writeln(format("Hello World %s", b));
This is the output produced by hovering the above non UFC line, it works and hover info shown for format
and writeln
as expected
2020-06-26T08:01:14.589 [trace] app.d:79:processRequest Calling provideHover
2020-06-26T08:01:14.596 [trace] dcd.d:180:__lambda5 Server: 2020-06-26T08:01:14.596 [info] main.d:291:runServer Getting doc comment
2020-06-26T08:01:14.596 [trace] dcd.d:180:__lambda5 Server: 2020-06-26T08:01:14.596 [info] main.d:302:runServer Request processed in 0 milliseconds
However in case of this, only hover info shows for writeln
but not for format
writeln("Hello World %s".format(b));
with the following output
2020-06-26T08:04:36.808 [trace] app.d:79:processRequest Calling provideHover
2020-06-26T08:04:36.815 [trace] dcd.d:180:__lambda5 Server: 2020-06-26T08:04:36.815 [info] main.d:291:runServer Getting doc comment
2020-06-26T08:04:36.815 [trace] dcd.d:180:__lambda5 Server: 2020-06-26T08:04:36.815 [warning] util.d:225:getSymbolsByTokenChain Could not find declaration of "Hello World %s" from position 194
2020-06-26T08:04:36.815 [trace] dcd.d:180:__lambda5 Server: 2020-06-26T08:04:36.815 [warning] doc.d:53:getDoc Could not find symbol
2020-06-26T08:04:36.815 [trace] dcd.d:180:__lambda5 Server: 2020-06-26T08:04:36.815 [info] main.d:302:runServer Request processed in 0 milliseconds
limitation of DCD, however I think for goto definition and hover it might be possible to cheat around this a little bit
Autocompletion does not work in this case either.