Should the following work? import std.traits;
mixin template Foo() { void foo(T)(T t) if (isSomeString!T) {} } class A { void foo()(int i){} mixin Foo; } void main() { auto a = new A; a.foo("hello"); }Error: template hello.A.foo does not match any function template declaration. Candidates are:
hello.A.foo()(int i)If i give the mixin an identifier (mixin Foo _foo) and call it like a._foo.foo("hello") then it works. I thought it should work without that though.