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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 9 18:03:53 PST 2012


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 at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at 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: -------


More information about the Digitalmars-d-bugs mailing list