May 29, 2008 [Issue 2134] New: 'Symbol undefined' when array created from tuple is sliced and used in foreach | ||||
---|---|---|---|---|
| ||||
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. -- |
September 23, 2009 [Issue 2134] 'Symbol undefined' when array created from tuple is sliced and used in foreach | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | 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 --- Comment #1 from Don <clugdbug@yahoo.com.au> 2009-09-23 05:27:38 PDT --- Fixed sometime before 2.041. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation