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

Fix 22934 - Emit context pointer as outer instead of this #13887

Merged
merged 1 commit into from
Mar 27, 2022

Conversation

MoonlightSentinel
Copy link
Contributor

Because the latter is obviosly not a valid identifier.

@MoonlightSentinel MoonlightSentinel added the Feature:dtoh C++ header generation label Mar 25, 2022
@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @MoonlightSentinel! 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 coverage diff by visiting the details link of the codecov check)
  • 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
22934 normal Header generator emits context pointer as `this`

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#13887"

@MoonlightSentinel MoonlightSentinel changed the title Fix 22934 - Emit context pointer as this instead of this Fix 22934 - Emit context pointer as this instead of outer Mar 25, 2022
@MoonlightSentinel
Copy link
Contributor Author

Fixed the typo in the commit title

@MoonlightSentinel MoonlightSentinel changed the title Fix 22934 - Emit context pointer as this instead of outer Fix 22934 - Emit context pointer as outer instead of this Mar 25, 2022
@@ -116,7 +116,7 @@ public:
{
public:
int32_t x;
A* this;
A* outer;
Copy link
Member

Choose a reason for hiding this comment

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

Can it be emitted as private?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure but why? The outer property isn't private in D.

ljmf00
ljmf00 previously requested changes Mar 26, 2022
Copy link
Member

@ljmf00 ljmf00 left a comment

Choose a reason for hiding this comment

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

This will break the dtoh end-user API. Probably we should add a changelog entry explaining it.

@MoonlightSentinel
Copy link
Contributor Author

MoonlightSentinel commented Mar 26, 2022

How so? Any header affected by this change wasn't compilable anyways (this is a reserved identifier)

Because the latter is obviosly not a valid identifier.
@thewilsonator thewilsonator merged commit c9d6c52 into dlang:master Mar 27, 2022
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.

6 participants