I have found the following regression in dmd 1.062 (works with 1.058).
Fawzi
module bug1;
class A{
int f(int a){
return a;
}
static A defaultA;
static this(){
defaultA=new A();
}
}
void TT(T)(T rIn,
int delegate(int) arg=&A.defaultA.f)
{
arg(2);
}
void instantiateTT(){
TT!(real)(4);
}
// with 1.062
// bug1.d(15): Error: cannot inline default argument &defaultA.f
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta