[Issue 532] New: Wrong name mangling for template alias params of local vars
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 16 12:35:39 PST 2006
http://d.puremagic.com/issues/show_bug.cgi?id=532
Summary: Wrong name mangling for template alias params of local
vars
Product: D
Version: 0.174
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: clugdbug at yahoo.com.au
In this example, in moo!(A), the value of Mang!(A).mangledname depends on
whether it is inside a 'static assert' or not. This seems to be a symptom of a
more general problem: I've seen many similar effects, but this is the simplest
so far.
---------
template Mang(alias F)
{
class G { }
alias void function (G ) H;
const char [] mangledname = typeof(H).mangleof;
}
template moo(alias A)
{
const char [] a = Mang!(A).mangledname;
static assert(Mang!(A).mangledname == a); // FAILS !!!
}
void main()
{
int q;
char [] b = moo!(q).a;
}
--
More information about the Digitalmars-d-bugs
mailing list