alias B = A!();
extern(C++, "foo", "bar")
struct A()
{
double f();
}
pragma(msg, A!().f.mangleof);
On linux it should print _ZN3foo3bar1A1fEv but prints _ZN3bar1A1fEv
On windows it should print ?f@?$A@@bar@foo@@QEAANXZ but prints ?f@?$A@@bar@@QEAANXZ
This basically ignores the "foo" part of the namespace. If you change or remove the "foo" you get the same result.
If you remove the `alias B = A!()` or move that after the declaration of `A` it gets the correct mangle.
If you change it to `extern(C++, foo.bar)` it gets the correct mangle.
Comment #1 by robert.schadek — 2024-12-13T19:09:42Z