| Thread overview | |||||
|---|---|---|---|---|---|
|
March 20, 2012 "Forward reference" eror message improvement? | ||||
|---|---|---|---|---|
| ||||
auto fact(int n) { return n > 1 ? fact(n - 1) : 0; }
// Error: forward reference to fact
I think the error message could be improved... maybe something like "forward reference to inferred return type" like we get with templates?
| ||||
March 21, 2012 Re: "Forward reference" eror message improvement? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Mehrdad | "Mehrdad" <wfunction@hotmail.com> wrote in message news:jkak36$2skq$1@digitalmars.com... > auto fact(int n) { return n > 1 ? fact(n - 1) : 0; } > > // Error: forward reference to fact > > > I think the error message could be improved... maybe something like "forward reference to inferred return type" like we get with templates? Please open an enhancement request. | |||
March 21, 2012 Re: "Forward reference" eror message improvement? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Daniel Murphy | http://d.puremagic.com/issues/show_bug.cgi?id=7747 "Daniel Murphy" wrote in message news:jkbnqu$1l52$1@digitalmars.com... "Mehrdad" <wfunction@hotmail.com> wrote in message news:jkak36$2skq$1@digitalmars.com... > auto fact(int n) { return n > 1 ? fact(n - 1) : 0; } > > // Error: forward reference to fact > > > I think the error message could be improved... maybe something like "forward reference to inferred return type" like we get with templates? Please open an enhancement request. | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply