[Issue 5383] New: writeln of alias-this matrix

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 28 02:12:10 PST 2010


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

           Summary: writeln of alias-this matrix
           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 2010-12-28 02:09:15 PST ---
I think this bug report is about two related but different bugs.

A D2 program:


import std.stdio: writeln;
struct Mat {
    int[][] a;
    alias a this;
}
void main() {
    writeln(Mat());
}


DMD 2.051 prints:

...\dmd\src\phobos\std\format.d(1149): Error: function expected before (), not
popFront(arr.a) of type void


----------------------------

A similar D2 program:


import std.stdio: writeln;
struct Mat {
    int[1][1] a;
    alias a this;
}
void main() {
    writeln(Mat());
}


DMD 2.051 prints:

toString(int[1u][1u]) called from ...\dmd\src\phobos\std\format.d(1432) is
deprecated. Instead you may want to import std.conv and use to!string(x)
instead of toString(x).
toString(int[1u][1u]) called from ...\dmd\src\phobos\std\format.d(1441) is
deprecated. Instead you may want to import std.conv and use to!string(x)
instead of toString(x).
toString(int[1u][1u]) called from ...\dmd\src\phobos\std\format.d(1451) is
deprecated. Instead you may want to import std.conv and use to!string(x)
instead of toString(x).
Mat


(I also suggest to perform a search for "toString(" in format.d)

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