[Issue 8307] inconsistent treatment of auto functions

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Apr 23 08:08:35 PDT 2014


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

--- Comment #4 from Andrej Mitrovic <andrej.mitrovich at gmail.com> ---
(In reply to timon.gehr from comment #3)
> In 'foo' the types of the two return expressions do not 'match exactly', yet
> it is accepted.

There's an error with -w though, so it's caught one way or the other. Although
maybe we're just lucky here.

> In 'bar' according to the spec the return type is settled
> after the first return statement, hence there would _not_ be a circular
> dependency.

Ah, ok then.

--


More information about the Digitalmars-d-bugs mailing list