http://d.puremagic.com/issues/show_bug.cgi?id=2810
Witold Baryluk <bary...@smp.if.uj.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bary...@smp.if.uj.edu.pl --- Comment #9 from Witold Baryluk <bary...@smp.if.uj.edu.pl> 2011-01-02 12:46:04 PST --- Hi, I also have similar problem, but involving two modules. Minimal test case (it also appears when functions are templates, or returns templated classes, or int type is changed to other type): /*****************************/ module m2; auto f(int x) { return x; } auto g(int x) { return f(x); } /*****************************/ /*****************************/ module m1; import m2 : g; void main() { g(5); } /*****************************/ It currently depend on the order of files given to the compiler. # dmd2 m1.d m2.d # error m1.d(6): Error: forward reference to g # dmd2 m2.d m1.d # works! # # dmd2 -c m1.d # error m1.d(6): Error: forward reference to g # dmd2 -c m2.d # works # As one can see there is actually NO forward references here. So I think it is simpler than co-recursive version of Steven. Bug disappears when function f and g, are moved to module m1. Or when function g have explicit return type. It maybe also related to the bug involving order of files on command line to the compiler. Thanks. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------