https://issues.dlang.org/show_bug.cgi?id=16343
Issue ID: 16343 Summary: Incorrectly requiring this pointer for a free function Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: issues.dl...@jmdavisprog.com This is a much reduced example from some code I'm working on: void main() { foo!(S.tupleof)(); } struct S { int i; } bool foo(fields...)() { return true; } It fails to compile, giving the error q.d(3): Error: need 'this' for 'foo' of type 'pure nothrow @nogc @safe bool()' I see no reason why that code shouldn't compile, and the error message is definitely bogus, because free functions don't need this pointers, and tupleof doesn't require a this pointer, since it's operating on a type, not an actual object. --