Mafi: > Imagine T was void. Then no return was ok. It wouldn't (shouldn't) > compile anyways because a parameter of type void is (should be) invalid. > However to enforce the compiler to see that T can't be void is a bit to > complicated, I think.
You are right, this different version runs: T foo(T)() {} void main() { foo!void(); } Thanks for all the answers, to you, Don and Jonathan. A question like this was probably more at home in the IRC channel. Bye, bearophile