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

#19652 Fix chained alias this. #9334

Merged
merged 1 commit into from Feb 18, 2019
Merged

#19652 Fix chained alias this. #9334

merged 1 commit into from Feb 18, 2019

Conversation

ghost
Copy link

@ghost ghost commented Feb 8, 2019

Culprit 4d4cd92

@ghost
Copy link
Author

ghost commented Feb 8, 2019

It looks good to merge as is but this is a regression fix so your PR can go in stable although it's not guaranteed that there'll be a 2084.2. Also you don't refer to any issue, the dlang bot should have tell you this. There should be an issue because the bug is delivered in 2084.0.

@Geod24
Copy link
Member

Geod24 commented Feb 8, 2019

@look-at-me : Thanks for the quick fix. Could you reword the commit to comply to our style, which, as @Basile-z mentioned, will also trigger dlang bot and the various automation.
It should be: "Fix issue 19652 - alias this chain no longer works" (or any other title you see as meaningful)

Adding a comment to the code, such as "// We need to check for alias this recursively" (over the first check) could also help prevent people doing the same mistake in the future.

Geod24
Geod24 previously requested changes Feb 8, 2019
Copy link
Member

@Geod24 Geod24 left a comment

Choose a reason for hiding this comment

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

Can you also add the following test in runnable:

auto otherTest(inout ref Base block) @nogc { assert(0); }
auto otherTest(inout ref A block) @nogc {}
// ...
otherTest(*thingie);

To make sure A is picked over Base ?

@dlang-bot
Copy link
Contributor

dlang-bot commented Feb 8, 2019

Thanks for your pull request and interest in making D better, @look-at-me! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the annotated coverage diff directly on GitHub with CodeCov's browser extension
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
19652 regression [REG2.084] alias this chain no longer works

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub fetch digger
dub run digger -- build "stable + dmd#9334"

@wilzbach
Copy link
Member

Your PR doesn't reference any Bugzilla issue.

Please follow this guide to reference your Bugzilla issue in your commit message. Thanks!

@ghost
Copy link
Author

ghost commented Feb 15, 2019

Fix Issue 19652 Fix chained alias this.

My commit message references an issue

https://issues.dlang.org/show_bug.cgi?id=19652

@wilzbach
Copy link
Member

My commit message references an issue

Looks like there was just a (temporary?) problem with the dlang-bot. It now detects your issue (:
So in accordance to:

image

I rebased your PR and re-targeted stable.

@wilzbach wilzbach changed the base branch from master to stable February 18, 2019 22:19
@wilzbach wilzbach dismissed Geod24’s stale review February 18, 2019 22:20

Tests have been added

@dlang-bot dlang-bot merged commit 2c09ec5 into dlang:stable Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants