digitalmars.D.bugs - [Issue 7263] New: Tuple slicing + -O switch causes "used before set" error
- d-bugmail puremagic.com (34/34) Jan 09 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7263
- d-bugmail puremagic.com (10/10) Jan 09 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7263
- d-bugmail puremagic.com (24/24) Jan 12 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7263
- d-bugmail puremagic.com (13/13) Feb 17 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7263
http://d.puremagic.com/issues/show_bug.cgi?id=7263 Summary: Tuple slicing + -O switch causes "used before set" error Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: k.hara.pg gmail.com --- Comment #0 from Kenji Hara <k.hara.pg gmail.com> 2012-01-09 19:24:23 PST --- Sample code: ---- template TypeTuple(T...){ alias T TypeTuple; } struct tuple { TypeTuple!(int, int) field; alias field this; } auto front(T)(ref T arr){ return arr[0]; } void main() { auto bars = [tuple(0, 0), tuple(1, 1)]; auto spam = bars.front[1..2]; // } Output: ---- Error: variable __tup3 used before set -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 09 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7263 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch --- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2012-01-09 20:03:31 PST --- https://github.com/D-Programming-Language/dmd/pull/609 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 09 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7263 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Tuple slicing + -O switch |Tuple indexing/slicing + -O |causes "used before set" |switch causes "used before |error |set" error --- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2012-01-12 00:59:46 PST --- Tuple indexing has same problem. template TypeTuple(T...){ alias T TypeTuple; } struct tuple { TypeTuple!(int, int) field; alias field this; } auto front(T)(ref T arr){ return arr[0]; } void main() { auto bars = [tuple(0, 0), tuple(1, 1)]; auto spam1 = bars.front[1]; // indexing auto spam2 = bars.front[1..2]; // slicing } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 12 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7263 yebblies <yebblies gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies gmail.com Resolution| |FIXED --- Comment #3 from yebblies <yebblies gmail.com> 2012-02-17 22:42:39 EST --- Works for me, presumably fixed by the fix to issue 4940 https://github.com/D-Programming-Language/dmd/commit/d6ede2edc28c94b6b3372eb1301cf300b0860eb6 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 17 2012