Summary: Pure std.typecons.Tuple
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos

--- Comment #0 from 2010-11-21 16:12:31 PST ---
This D2 program seems to show that a strongly pure function can't generate and
return a std.typecons.Tuple, but I'd like it, if possible:

import std.typecons: Tuple;
pure Tuple!int foo() {
    return Tuple!int(0);
void main() {
    assert(foo()[0] == 0);

dmd 2.050 shows the error:
test.d(3): Error: pure function 'foo' cannot call impure function 'this'

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to