Bug 16041 – Forward reference with auto return

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-05-18T10:33:38Z
Last change time
2024-12-13T18:47:47Z
Assigned to
No Owner
Creator
Max Samukha
Moved to GitHub: dmd#19124 →

Comments

Comment #0 by maxsamukha — 2016-05-18T10:33:38Z
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()'
Comment #1 by robert.schadek — 2024-12-13T18:47:47Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19124 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB