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
Issue 14669 - auto attribute on function parameter should be error always #4729
Conversation
d45b435
to
c257f2c
Compare
|
Hmm. But the message would not fit for the incorrect parameter
|
👍 |
OK, done. |
Also fix an order dependent bug that is found on Bugzilla 14720. |
Rebased on master, and ready for ddmd. |
} | ||
else | ||
{ | ||
error(loc, "auto can only be used for template function parameters"); | ||
error(loc, "'auto' can only be used as the part of 'auto ref' for template function parameters"); |
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.
Should be 'used as part of'
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.
OK, fixed.
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/fail14669.d(11): Error: 'auto' can only be used as the part of 'auto ref' for template function parameters |
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.
Tests will need updating too
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.
Sorry... fixed.
Auto-merge toggled on |
Thank you! |
Issue 14669 - auto attribute on function parameter should be error always
https://issues.dlang.org/show_bug.cgi?id=14669