[Issue 7262] 'used before set' error with no line number

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 9 19:09:42 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7262


Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch, rejects-valid


--- Comment #1 from Kenji Hara <k.hara.pg at 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: -------


More information about the Digitalmars-d-bugs mailing list