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

Fix issue 19891 - Confusing error messages for auto ref parameters with default values #9894

Merged
merged 2 commits into from Jun 6, 2019

Conversation

SSoulaimane
Copy link
Member

@SSoulaimane SSoulaimane commented May 26, 2019

19891.

Should this go stable?

src/dmd/typesem.d Outdated Show resolved Hide resolved
@thewilsonator
Copy link
Contributor

I think so.

@WalterBright
Copy link
Member

Should this go stable?

No. It's a minor issue, and not a regression.

@jacob-carlborg
Copy link
Contributor

No. It's a minor issue, and not a regression.

All bug fixes should target stable unless they are big/complex/introduce breaking changes.

@@ -4154,6 +4154,7 @@ extern (C++) final class TypeFunction : TypeNext
ubyte iswild; // bit0: inout on params, bit1: inout on qualifier
Expressions* fargs; // function arguments
int inuse;
bool incomplete; // return type or default arguments removed
Copy link
Member

Choose a reason for hiding this comment

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

I don't really get what this means.

Copy link
Member Author

Choose a reason for hiding this comment

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

Wait until I mark this PR ready for review, I found an issue which may result in removing that flag.

Copy link
Member Author

Choose a reason for hiding this comment

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

What do you suggest would be more descriptive.

@WalterBright
Copy link
Member

All bug fixes should target stable unless they are big/complex/introduce breaking changes.

When "All" is used, one should be careful not to drive over a cliff. In this case, it's a trivial refinement, and not worth the risk of destabilizing the stable version.

@jacob-carlborg
Copy link
Contributor

It's not my rules.

@SSoulaimane SSoulaimane force-pushed the fix19891 branch 3 times, most recently from d65ba9f to b8869f6 Compare June 2, 2019 22:22
@SSoulaimane SSoulaimane marked this pull request as ready for review June 2, 2019 23:04
@SSoulaimane SSoulaimane requested a review from ibuclaw as a code owner June 2, 2019 23:04
@thewilsonator thewilsonator added the 72h no objection -> merge The PR will be merged if there are no objections raised. label Jun 3, 2019
If no argument is given then then the default argument decides `ref`,
and if an argument is present then the default argument is never used.
@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @SSoulaimane! 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
19891 minor Confusing error message for auto ref parameters with default values

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 "master + dmd#9894"

@thewilsonator thewilsonator added auto-merge and removed 72h no objection -> merge The PR will be merged if there are no objections raised. labels Jun 6, 2019
@dlang-bot dlang-bot merged commit 63f76ba into dlang:master Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants