-
-
Notifications
You must be signed in to change notification settings - Fork 610
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
fix Issue 23651 - Order dependency in semantic analysis of template members #14843
Conversation
|
Thanks for your pull request, @WalterBright! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#14843" |
9737717 to
4798bef
Compare
4798bef to
76a5cc4
Compare
|
At what point should we just put resolving in a visitor or similar encapsulated interface so it isn't just a little special case here, a little bit there, all over the place? Not that it would solve anything, but might least make it easier to grok what's going on, and allow resolve/match symbols consistently without semantic getting in the way. (Write a spec, follow the spec). Half of this just looks like treating the visible mould, but actually it's taken over the entire wall. |
|
@ibuclaw I actually agree with you. Before I did this PR, I spent a couple frustrating days trying more fundamental solutions, but they'd all fail with weird problems. I'm not happy with this solution, but it has the positive characteristic of working.
Yeah, well, |
|
|
Mixins yes, though I wonder if there could be a construct for a function/type/variable inside any form of conditional declaration, where if the condition it depends upon results as true, use it, otherwise pass the next matched symbol in scope/import. Would mean doing a light form of semantic on all possible code paths though before we decide keep or discard. I'm probably being too optimistic. |
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.
Not great, as now there's yet another "avoid semantic on..." block.
AliasDeclarations should behave like other declarations w.r.t. being able to be lazily semantically evaluated.