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

Issue 14669 - auto attribute on function parameter should be error always #4729

Merged
merged 3 commits into from Aug 31, 2015

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Jun 9, 2015

@9rnsr 9rnsr force-pushed the fix14669 branch 5 times, most recently from d45b435 to c257f2c Compare June 9, 2015 16:54
@schuetzm
Copy link
Contributor

auto can only be used for template function parameters
=> wouldn't it be clearer if it said _auto ref_ can only be used ...?

@9rnsr
Copy link
Contributor Author

9rnsr commented Jun 10, 2015

Hmm. But the message would not fit for the incorrect parameter auto int a. How about:

'auto' can only be used as the part of 'auto ref' for template function parameters ?

@schuetzm
Copy link
Contributor

👍

@9rnsr
Copy link
Contributor Author

9rnsr commented Jun 10, 2015

OK, done.

@9rnsr
Copy link
Contributor Author

9rnsr commented Jun 23, 2015

Also fix an order dependent bug that is found on Bugzilla 14720.

@9rnsr
Copy link
Contributor Author

9rnsr commented Aug 30, 2015

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");
Copy link
Member

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'

Copy link
Contributor Author

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
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry... fixed.

@yebblies
Copy link
Member

Auto-merge toggled on

@9rnsr
Copy link
Contributor Author

9rnsr commented Aug 31, 2015

Thank you!

yebblies added a commit that referenced this pull request Aug 31, 2015
Issue 14669 - auto attribute on function parameter should be error always
@yebblies yebblies merged commit 2ba1045 into dlang:master Aug 31, 2015
@9rnsr 9rnsr deleted the fix14669 branch August 31, 2015 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants