Bug 4075 – [CTFE] forward reference error with auto

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2010-04-09T10:26:00Z
Last change time
2011-02-12T15:04:10Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bearophile_hugs
Blocks
340

Comments

Comment #0 by bearophile_hugs — 2010-04-09T10:26:59Z
auto foo() { return 0; } enum int _ = foo(); void main() {} dmd 2.043 outputs: test.d(4): Error: forward reference to foo test.d(4): Error: function expected before (), not __error of type int (This bug is derived from a split of bug 3911.)
Comment #1 by clugdbug — 2011-02-12T15:04:10Z
Duplicate of 2810, which is fixed in the upcoming release. *** This issue has been marked as a duplicate of issue 2810 ***