digitalmars.D.bugs - [Issue 4139] New: Forward reference error in front() of iterable struct
- d-bugmail puremagic.com (33/33) May 01 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4139
- d-bugmail puremagic.com (11/11) Aug 26 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4139
http://d.puremagic.com/issues/show_bug.cgi?id=4139 Summary: Forward reference error in front() of iterable struct Product: D Version: unspecified Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc This is D2 code: Foo!(TArray) foo(TArray)(TArray r) { // the usual helper function return Foo!(TArray)(r); } struct Foo(TArray) { TArray arr; bool empty() { return !arr.length; } void popFront() { arr = arr[1 .. $]; } // int front() { return arr[0]; } // OK auto front() { return arr[0]; } // line 12 } void main() { foreach (el; foo([10])) {} } DMD 2.043 prints: test.d(12): Error: forward reference to inferred return type of function call __r1.front() -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 01 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4139 bearophile_hugs eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED This bug is missing in dmd 2.048, so I close it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 26 2010