Bug 8149 – Possible forward reference mistake

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2012-05-25T13:25:00Z
Last change time
2013-01-16T07:20:21Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2012-05-25T13:25:50Z
import std.algorithm: map; auto foo() { int spam(int) { if (true) { return 0; } else { [1].map!spam(); int this_is_a_mistake; return 0; } } return &spam; } void main() {} DMD 2.060alpha gives: test.d(8): Error: variable this_is_a_mistake forward referenced test.d(7): Error: template instance test.foo.map!(spam).map!(int[]) error instantiating
Comment #1 by yebblies — 2013-01-16T07:20:21Z
No error with 2.062