-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use crumb to get return type of a templated function or the type of a cast #178
Conversation
Not ready to be merged until DCD can be compiled with latest version of libdparse/dsymbol.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a test for this?
else if (currentSymbol.type is null) | ||
break; // this is a fully resolved type (casting)! | ||
else if (currentSymbol.type.name == "void") | ||
return; // it's void, no need to continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about void[]
?
yes, i am working on that right now |
The more i test things, the more i realize that the code is broken, DSymbol doesn't hold enough information to make such guesses about templates/casting.. therefore it produces a lot wrong completions as a side effect The code base is also challenging to read and follow, i'm not sure i will be able to continue this PR, it's very challenging |
I think i managed to find a way to do it reliably, but that'll need to also touch DCD I will send a PR once DSymbol and DCD get merged together, so the PR will be easier to review |
moved to dlang-community/DCD#681 |
Before:
After:
Don't mind the colors, it's just my theme that is broken