https://issues.dlang.org/show_bug.cgi?id=16041
Issue ID: 16041
Summary: Forward reference with auto return
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
The compiler should be able to resolve the return type:
struct Tree {
Tree* left;
}
auto fmap() {
return new Tree(fmap());
}
void main()
{
fmap();
}
Error: forward reference to inferred return type of function call 'fmap()'
--
