[Issue 420] New: mixin make dmd break
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Oct 9 18:28:23 PDT 2006
http://d.puremagic.com/issues/show_bug.cgi?id=420
Summary: mixin make dmd break
Product: D
Version: 0.169
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: davidl at 126.com
import std .stdio ;
template MGettor (alias Fld) {
typeof(Fld) opCall () {
writefln("getter");
return Fld;
}
}
class Foo {
int a = 1 ,
b = 2 ;
mixin MGettor!(a) geta;
mixin MGettor!(b) getb;
}
void main () {
auto foo = new Foo;
writefln(foo.geta);
writefln(foo.getb);
}
error from dmd:
parse a
semantic a
semantic2 a
semantic3 a
code a
generating code for function 'opCall'
generating code for function 'opCall'
generating code for function 'main'
foo dotexp mixin MGettor!(a);
Internal error: e2ir.c 772
--
More information about the Digitalmars-d-bugs
mailing list