[Issue 8180] New: UFCS writeln doesn't work with Tuples

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jun 1 13:23:35 PDT 2012


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

           Summary: UFCS writeln doesn't work with Tuples
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2012-06-01 13:25:28 PDT ---
import std.stdio, std.typecons;
void main() {
    static struct Foo { int x; }
    auto f = Foo(20);
    f.writeln(); // OK
    Tuple!(int) t = tuple(10);
    t.writeln(); // error
}



dmd 2.060alpha gives

test.d(7): Error: not a property t.writeln
test.d(7): Error: function expected before (), not writeln(t) of type void

-- 
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