code-d icon indicating copy to clipboard operation
code-d copied to clipboard

Hover information not working with UFCS

Open exoticus opened this issue 4 years ago • 2 comments

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

exoticus avatar Jun 26 '20 06:06 exoticus

limitation of DCD, however I think for goto definition and hover it might be possible to cheat around this a little bit

WebFreak001 avatar Jun 26 '20 07:06 WebFreak001

Autocompletion does not work in this case either.

AntonC9018 avatar Aug 29 '21 10:08 AntonC9018