-
-
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
[Trivial] Fix super.visit issue in SemanticTimeTransitiveVisitor #7635
Conversation
|
Thanks for your pull request, @RazvanN7! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Some tips to help speed things up:
Bear in mind that large or tricky changes may require multiple rounds of review and revision. Please see CONTRIBUTING.md for more information. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
src/dmd/visitor.d
Outdated
| @@ -112,7 +112,8 @@ extern (C++) class SemanticTimeTransitiveVisitor : SemanticTimePermissiveVisitor | |||
| { | |||
| alias visit = SemanticTimePermissiveVisitor.visit; | |||
|
|
|||
| mixin ParseVisitMethods!ASTCodegen; | |||
| mixin ParseVisitMethods!ASTCodegen methods; | |||
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.
Perhaps prefix methods with two underscores or something. Because this symbol will be visible outside.
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.
Because this symbol will be visible outside.
I don't like it. With as powerful a language as D is, is there no way to make it private?
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.
Putting private before the mixin makes all the visit methods private. I don't know of any workaround.
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.
@jacob-carlborg Done, thanks!
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.
In my opinion, the compiler should do this automatically
Maybe file a bug about this, and put a comment with a link to that bug in the source code.
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.
Already did it : https://issues.dlang.org/show_bug.cgi?id=18132
f0ccdea to
d8bdfa1
Compare
|
👌. |
|
double underscores are reserved for compiler internal symbols! Thanks! |
This adds the same workaround to ParseTimeTransitiveVisitor, which has already been used for SemanticTimeTransitiveVisitor in dlang#7635.
This adds the same workaround to ParseTimeTransitiveVisitor, which has already been used for SemanticTimeTransitiveVisitor in dlang#7635.
This adds the same workaround to ParseTimeTransitiveVisitor, which has already been used for SemanticTimeTransitiveVisitor in #7635.
This adds the same workaround to ParseTimeTransitiveVisitor, which has already been used for SemanticTimeTransitiveVisitor in dlang/dmd#7635.
The methods which are mixed in aren't included in the overload set of the scope. This needs to be done manually. In my opinion, the compiler should do this automatically, but this PR only fixes the current issue so that calls to super.visit will be resolved correctly.