Skip to content

Conversation

@RazvanN7
Copy link
Contributor

@RazvanN7 RazvanN7 commented Apr 5, 2018

No description provided.

@dlang-bot
Copy link
Contributor

dlang-bot commented Apr 5, 2018

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 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
18228 normal this(this a){} doesn't generate postblit ctor; this(this){} does

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#8141"

@rainers
Copy link
Member

rainers commented Apr 5, 2018

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.

@rainers
Copy link
Member

rainers commented Apr 11, 2018

andralex approved these changes 17 hours ago

@andralex Please approve removing using this and super as a type, too, please. See https://issues.dlang.org/show_bug.cgi?id=12228

I suspect changing this needs a deprecation first, though.

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

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.

Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Thanks!

Copy link
Member

@andralex andralex left a 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
Copy link
Member

cc @WalterBright

@JinShil
Copy link
Contributor

JinShil commented Apr 12, 2018

OK with me. I think we need a deprecation.

@andralex If that comment was in response to @rainers comment about removing this and super as a type, please explicitly state your approval in the issue tracker at https://issues.dlang.org/show_bug.cgi?id=12228

@RazvanN7 RazvanN7 force-pushed the Issue_18228 branch 2 times, most recently from 77e56f6 to b2e34be Compare April 12, 2018 08:38
@RazvanN7
Copy link
Contributor Author

OK with me. I think we need a deprecation.

Made it a deprecation.

Copy link
Contributor

@jacob-carlborg jacob-carlborg left a 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.

@RazvanN7
Copy link
Contributor Author

@jacob-carlborg Done.

//Use `typeof(this)` instead

this(int a, this b) {} // ditto
}
Copy link
Contributor

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.

Copy link
Contributor

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.

@jacob-carlborg
Copy link
Contributor

Do we need a spec update? How are we dealing with deprecations and spec updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants