[Issue 619] New: Alias of templated struct instance crashes 0.175
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Nov 29 15:42:22 PST 2006
http://d.puremagic.com/issues/show_bug.cgi?id=619
Summary: Alias of templated struct instance crashes 0.175
Product: D
Version: 0.175
Platform: PC
OS/Version: Windows
Status: NEW
Severity: critical
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: kirklin.mcdonald at gmail.com
The following code crashes DMD 0.175, but works in DMD 0.174:
import std.stdio;
struct Foo {
int i;
}
template some_struct_instance(T) {
static Foo some_struct_instance = {
5, /*i*/
};
}
void main() {
alias some_struct_instance!(int) inst;
writefln(inst.i);
}
Curiously, it works if main is rewritten like this:
void main() {
writefln(some_struct_instance!(int).i);
}
--
More information about the Digitalmars-d-bugs
mailing list