Bug 21063 – getLinkage is wrong for forward reference extern(C++) class

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2020-07-21T08:03:47Z
Last change time
2020-08-10T12:09:36Z
Keywords
pull
Assigned to
No Owner
Creator
Dan Printzell

Comments

Comment #0 by dlang — 2020-07-21T08:03:47Z
``` static assert(__traits(getLinkage, Klass) == "C++"); // Succeeds pragma(msg, __traits(getLinkage, Klass)); // Gets D linkage (Wrong) extern (C++) class Klass { void a() {} } static assert(__traits(getLinkage, Klass) == "C++"); pragma(msg, __traits(getLinkage, Klass)); // Correct linkage ```
Comment #1 by dlang-bot — 2020-07-21T08:08:17Z
@Geod24 created dlang/dmd pull request #11438 "Fix 21063 - getLinkage fails with forward references" fixing this issue: - Fix 21063 - getLinkage fails with forward references Use the same code as other traits, e.g. getClassInstanceSize, use. https://github.com/dlang/dmd/pull/11438
Comment #2 by dlang-bot — 2020-07-22T00:53:10Z
dlang/dmd pull request #11438 "Fix 21063 - getLinkage fails with forward references" was merged into stable: - 6134972c17e29e9d193d777013fa67df17451434 by Geod24: Fix 21063 - getLinkage fails with forward references Use the same code as other traits, e.g. getClassInstanceSize, use. https://github.com/dlang/dmd/pull/11438
Comment #3 by dlang-bot — 2020-08-10T12:09:36Z
dlang/dmd pull request #11542 "merge stable" was merged into master: - 0032771880801ce889822181ffe44849d074a0ac by Geod24: Fix 21063 - getLinkage fails with forward references Use the same code as other traits, e.g. getClassInstanceSize, use. https://github.com/dlang/dmd/pull/11542