mixin template Foo() {
pragma(mangle, "bar")
extern(C) static void foo() {
}
}
void main() {
mixin Foo;
}
No 'bar' in the generated object. To work around, nest the function in a dummy struct.
Comment #1 by pro.mathias.lang — 2021-06-16T05:30:26Z
Confirmed. Trying to call it from the scope of main also triggers a linker error on OSX. Sounds like a missing override in a visitor.
Comment #2 by robert.schadek — 2024-12-13T19:17:02Z