/* test.d */
module test;
mixin template Foo() {
mixin("@property int bar() const { return foo; }");
}
int foo = 1;
mixin Foo;
unittest {
assert(foo == bar);
}
test.d-mixin-4(4): Error: function test.Foo!().bar without 'this' cannot be constrdmd -main -unittest test.d
test.d(9): Error: mixin test.Foo!() error instantiating
