The compiler chokes on the code below with the error: need 'this' to access member a'. Should it?
template TFoo(alias T)
{
void foo()
{
writefln(T);
}
}
template TBar(alias T)
{
void bar()
{
TFoo!(T).foo();
}
}
class Test
{
int a;
mixin TBar!(a);
}
void main()
{
}
Works fine with DMD 1.021 / 2.003
P.S. When you say "one variation", please let me know which one. This is especially helpful when I cannot reproduce the problem.