[Issue 10810] wrong forward reference error when using return type deduction and a cyclic call flow

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Jul 2 06:36:08 PDT 2017


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

--- Comment #6 from timon.gehr at gmx.ch ---
(In reply to Vladimir Panteleev from comment #5)
> (In reply to timon.gehr from comment #3)
> > Currently, this is quite conservative. Analysis of any function is suspended
> > if a function call with unresolved return type is encountered, until this
> > return type has been resolved.
> 
> Short-circuiting return type analysis to "void" if there are no return
> statements in the body seems like a reasonable way to solve this particular
> case to me.

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.

--


More information about the Digitalmars-d-bugs mailing list