This small D2 program compiles with no errors:

T foo(T)(T x) {}
void main() {}

But there is no way it can compile, regardless of the type T, because foo()() 
lacks a return statement. 
So is it possible for the D compiler to perform some sanity tests for the 
template functions too, to catch a bugs like this one?

Bye,
bearophile

Reply via email to