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

--- Comment #0 from 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:
------- You are receiving this mail because: -------

Reply via email to