https://issues.dlang.org/show_bug.cgi?id=19084 --- Comment #2 from anonymous4 <dfj1esp02 at sneakemail.com> --- You can reference the symbol directly: import std.format : format; struct Bar(T) { mixin("T foo;"); } unittest { struct Foo { } Bar!Foo bar; } --