mixin template test() { int next; } void foo(alias l, alias t)() { t.next = l.next; } void main() { struct A { int next; } A a; mixin test l1; mixin test l2; foo!(l1,a); //ok! foo!(l1,l2); //compilation error! }