Bug 22934 – Header generator emits context pointer as `this`

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-03-25T15:05:00Z
Last change time
2022-03-27T05:10:19Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel

Comments

Comment #0 by moonlightsentinel — 2022-03-25T15:05:00Z
The header generator prints the name of the implicitly generated member that represents the context pointer as `this` which is obviously not a valid identifier. e.g. --- example.d extern(C++) class Outer { class Inner { } } --- example.h class Outer { public: class Inner { public: Outer* outer; }; };
Comment #1 by dlang-bot — 2022-03-25T15:06:29Z
@MoonlightSentinel created dlang/dmd pull request #13887 "Fix 22934 - Emit context pointer as `this` instead of `this`" fixing this issue: - Fix 22934 - Emit context pointer as `this` instead of `this` Because the latter is obviosly not a valid identifier. https://github.com/dlang/dmd/pull/13887
Comment #2 by dlang-bot — 2022-03-27T05:10:19Z
dlang/dmd pull request #13887 "Fix 22934 - Emit context pointer as `outer` instead of `this`" was merged into master: - cd1017c7e2aed79f5484d4eca93313b60ba40de6 by MoonlightSentinel: Fix 22934 - Emit context pointer as `outer` instead of `this` Because the latter is obviosly not a valid identifier. https://github.com/dlang/dmd/pull/13887