https://issues.dlang.org/show_bug.cgi?id=16194

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from [email protected] ---
In other words, the compiler apparently extracts info about the return type
from the first return statement it comes across, rather than trying to find a
common type that matches all of the return statements.

As an obvious workaround, I suggest you avoid using the auto keyword here. The
compiler might have some trouble looking for common types, and I doubt this is
something that need urgent attention.

--

Reply via email to