digitalmars.D.bugs - [Issue 2134] New: 'Symbol undefined' when array created from tuple is sliced and used in foreach
- d-bugmail puremagic.com (30/30) May 29 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2134
- d-bugmail puremagic.com (12/12) Sep 23 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2134
http://d.puremagic.com/issues/show_bug.cgi?id=2134 Summary: 'Symbol undefined' when array created from tuple is sliced and used in foreach Product: D Version: 1.030 Platform: PC OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: samukha voliacable.com The error occurs only if $ (or length) is used to slice the array: ---- template Foo(A...) { const Foo = cast(int[])[A]; // BTW, why is the cast required here? } void main() { foreach (i; Foo!(1, 2)[1 .. $]) { } } ---- Error 42: Symbol Undefined _D4test4mainFZv8__dollark The error disappears if the array length is accessed explicitly or the test is built with -release switch. --
May 29 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2134 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |clugdbug yahoo.com.au Resolution| |FIXED Fixed sometime before 2.041. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 23 2009