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

           Summary: std.typecons.Tuple problem with one field
           Product: D
           Version: future
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2010-06-06 04:59:29 PDT ---
This D2 program looks correct:


import std.typecons: Tuple;
void main() {
    auto t = Tuple!(int)(1);
}



But DMD v2.046 prints at compile-time:

...\src\phobos\std\typecons.d(349): Error: no property 'Types' for type 'int'
Error: no property 'length' for type 'int'
...\src\phobos\std\typecons.d(349): Error: static assert  (0u == 1u) is false
test.d(3):        instantiated from here: __ctor!(int)


If tuples don't support a single item, then the docs have to say it, and it's
better to produce a better error message.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to