https://issues.dlang.org/show_bug.cgi?id=10810
--- Comment #8 from timon.g...@gmx.ch --- (In reply to Vladimir Panteleev from comment #7) > (In reply to timon.gehr from comment #6) > > The compiler does not know whether there are any return statements in the > > body when starting the analysis of a function because of conditional > > compilation and string mixins. > > Are you saying that the compiler knows that a calls b, but doesn't know that > a doesn't have any return statements? What I'm saying is that you cannot short-circuit semantic analysis of function bodies based on unknown information. How would the compiler determine that there are no return statements in a's body? E.g.: auto a(){ auto y = b(); mixin(foo(y)); } // whether a returns depends on the return type of b. --