The error is in MulExp::semantic. It happens no matter if the multiplication expression is in a template. These are the combinations that fail: IF / ifloat IF / IF ID / idouble ID / ID IR / ireal IR / IR Here's a sample: import std.stdio; typedef ifloat IF; typedef idouble ID; typedef ireal IR; template PrintAddedType(X, Y) { void PrintAddedType() { X x; Y y; writeln( typeid( x ), " ", typeid( y ), " ", typeid( x / y ) ); } } template PrintAddedType(X) { void PrintAddedType() { /* PrintAddedType!(X, ifloat)(); PrintAddedType!(X, idouble)(); PrintAddedType!(X, ireal)(); */ /* PrintAddedType!(X, IF)(); PrintAddedType!(X, ID)(); PrintAddedType!(X, IR)(); */ } } void main() { /* PrintAddedType!(IF)(); PrintAddedType!(ID)(); PrintAddedType!(IR)(); */ IR x; IR y; writeln( typeid( x ), " ", typeid( y ), " ", typeid( x / y ) ); }
The patch for bug 3919 fixes this one, too.
changeset 415
Fixed DMD1.058 and 2.043.