Skip to content
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

Merged
merged 1 commit into from
Jan 8, 2018

Conversation

RazvanN7
Copy link
Contributor

@RazvanN7 RazvanN7 commented Jan 8, 2018

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.

@RazvanN7 RazvanN7 requested a review from WalterBright as a code owner January 8, 2018 10:49
@dlang-bot
Copy link
Contributor

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:

  • smaller, focused PRs are easier to review than big ones

  • try not to mix up refactoring or style changes with bug fixes or feature enhancements

  • provide helpful commit messages explaining the rationale behind each change

Bear in mind that large or tricky changes may require multiple rounds of review and revision.

Please see CONTRIBUTING.md for more information.

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

@RazvanN7 RazvanN7 changed the title Fix super.visit issue in SemanticTimeTransitiveVisitor [Trivial] Fix super.visit issue in SemanticTimeTransitiveVisitor Jan 8, 2018
@dlang-bot dlang-bot added the Review:Trivial typos, formatting, comments label Jan 8, 2018
@@ -112,7 +112,8 @@ extern (C++) class SemanticTimeTransitiveVisitor : SemanticTimePermissiveVisitor
{
alias visit = SemanticTimePermissiveVisitor.visit;

mixin ParseVisitMethods!ASTCodegen;
mixin ParseVisitMethods!ASTCodegen methods;
Copy link
Contributor

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jacob-carlborg Done, thanks!

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jacob-carlborg
Copy link
Contributor

👌.

@dlang-bot dlang-bot merged commit cc6a1b2 into dlang:master Jan 8, 2018
@UplinkCoder
Copy link
Member

double underscores are reserved for compiler internal symbols!
please use a single underscore.

Thanks!

tim-dlang added a commit to tim-dlang/dmd that referenced this pull request Apr 15, 2022
This adds the same workaround to ParseTimeTransitiveVisitor,
which has already been used for SemanticTimeTransitiveVisitor
in dlang#7635.
tim-dlang added a commit to tim-dlang/dmd that referenced this pull request Apr 16, 2022
This adds the same workaround to ParseTimeTransitiveVisitor,
which has already been used for SemanticTimeTransitiveVisitor
in dlang#7635.
dlang-bot pushed a commit that referenced this pull request Apr 17, 2022
This adds the same workaround to ParseTimeTransitiveVisitor,
which has already been used for SemanticTimeTransitiveVisitor
in #7635.
kinke pushed a commit to ldc-developers/ldc that referenced this pull request Nov 25, 2022
This adds the same workaround to ParseTimeTransitiveVisitor,
which has already been used for SemanticTimeTransitiveVisitor
in dlang/dmd#7635.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merge:auto-merge Review:Trivial typos, formatting, comments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants