-
-
Notifications
You must be signed in to change notification settings - Fork 656
Fix Issue 18228 - this(this a){} doesn't generate postblit ctor; this(this){} does #8141
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
Conversation
|
Thanks for your pull request and interest in making D better, @RazvanN7! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
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
Testing this PR locallyIf 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#8141" |
|
Please also note https://issues.dlang.org/show_bug.cgi?id=12228 which shows that the syntax has been explicitly added at some point, but with very strange limitations. This is not something that is specific to constructors but should be banned in any case, but Walter disagreed in that bug report. |
@andralex Please approve removing using I suspect changing this needs a deprecation first, though. |
test/fail_compilation/fail18228.d
Outdated
| TEST_OUTPUT: | ||
| --- | ||
| fail_compilation/fail18228.d(11): Error: `this` cannot be used as a parameter type, use `typeof(this)` instead | ||
| fail_compilation/fail18228.d(12): Error: `this` cannot be used as a parameter type, use `typeof(this)` instead |
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.
This is a comma splice. Please change the comma to a semi-colon or period.
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.
@MetaLang do you have the rights to make changes to PRs?
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.
Done. Thanks!
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 with me. I think we need a deprecation.
@andralex If that comment was in response to @rainers comment about removing |
77e56f6 to
b2e34be
Compare
Made it a deprecation. |
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.
A changelog is required as well, describing the problem and what to do to solve it.
|
@jacob-carlborg Done. |
| //Use `typeof(this)` instead | ||
|
|
||
| this(int a, this b) {} // ditto | ||
| } |
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.
There's no information how to resolve it.
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.
Well, I guess it's mentioned in the deprecation message which is included above.
|
Do we need a spec update? How are we dealing with deprecations and spec updates? |
No description provided.