digitalmars.D.bugs - [Issue 7262] New: 'used before set' error with no line number
- d-bugmail puremagic.com (31/31) Jan 09 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7262
- d-bugmail puremagic.com (18/18) Jan 09 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7262
- d-bugmail puremagic.com (13/13) Feb 17 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7262
http://d.puremagic.com/issues/show_bug.cgi?id=7262 Summary: 'used before set' error with no line number Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: diagnostic Severity: major Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc --- Comment #0 from bearophile_hugs eml.cc 2012-01-09 18:03:52 PST --- import std.algorithm: map; import std.typecons: tuple; int foo() { return 0; } void main() { auto bars = map!(n => tuple(foo(), n))([10]); auto spam = bars.front[1]; } Compiling with: dmd -O test.d DMD 2.058head gives: Error: variable __tup818 used before set Note the lack of error line number. -- 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=7262 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch, rejects-valid --- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2012-01-09 19:09:39 PST --- It is tuple + indexing + optimization bug. Workaround: void main() { auto bars = map!(n => tuple(foo(), n))([10]); auto spam_tup = bars.front;//[1]; // save whole tuple temporarily auto spam = spam_tup[1]; // get an element of tuple } It will be fixed by merging: 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=7262 yebblies <yebblies gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies gmail.com Resolution| |FIXED --- Comment #2 from yebblies <yebblies gmail.com> 2012-02-17 22:41:15 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