Bug 21373 – extern(C++) ignored on template mixin declarations

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-11-09T21:32:36Z
Last change time
2024-12-13T19:12:33Z
Assigned to
No Owner
Creator
moonlightsentinel
Moved to GitHub: dmd#17996 →

Comments

Comment #0 by moonlightsentinel — 2020-11-09T21:32:36Z
Test case: ======================================== extern(C++) mixin template MTC() { int foo(int i) { return i; } } mixin MTC!(); static assert(__traits(getLinkage, foo) == "C++"); ======================================== The assert currently fails because the `extern(C++)` has no effect on foo, causing __traits(getLinkage, foo) to return "D".
Comment #1 by robert.schadek — 2024-12-13T19:12:33Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17996 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB