type checking in DD function
Type checking is not working properly. e.g. the following should give an
error as a function definition, as not all paths return a value.
if(x)
{return 0;}
(from redmine: issue id 2569, created on 2016-05-02, closed on 2016-08-05)