-
-
Notifications
You must be signed in to change notification settings - Fork 747
[blocker fix]: use auto return in std.datetime #2689
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
|
LGTM. |
|
Auto-merge toggled on |
[blocker fix]: use auto return in std.datetime
|
The change doesn't make the code worse, but we shouldn't change legit code to let dmd pass the testsuite. |
|
Wait, what? We have just changed Phobos to ignore DMD regression that will bite us upon next release? |
|
It's not a dmd regression. If you add the following to the class as line 14219: it will fail with previous dmd in the same way. I.e. it's an existing problem. |
|
How is this related? What I see that there is a simple line of code in Phobos that did compile before and stopped working with dmd change. Same code pattern can possibly exist in user code and will stop compiling too. Or am I missing something? |
|
What the dmd change was was it added a destructor so that the invariant would run upon destruction of the object. Adding the destructor manually produces the same effect. |
|
But shouldn't |
So your reasoning is: "There was a way to explicitly trigger the same bug before, so it's not a regression"? That's not what users care about at all. |
|
Let's agree on the following. It's a separate compiler bug that was revealed by adding a dtor to a struct. |
|
Sure, this is a sensible thing to do. It's the claim that it is not a (potential) regression I objected to. |
Yeah, it's indeed something we'll have to fix soonish. |
This is a blocker for dlang/dmd#4136
Without it, the error is: