Thread overview
[Issue 5383] New: writeln of alias-this matrix
Oct 27, 2012
Kenji Hara
December 28, 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@puremagic.com
        ReportedBy: bearophile_hugs@eml.cc


--- Comment #0 from bearophile_hugs@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: -------
October 27, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5383


hsteoh@quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsteoh@quickfur.ath.cx


--- Comment #1 from hsteoh@quickfur.ath.cx 2012-10-27 10:23:42 PDT ---
This bug no longer occurs on git HEAD. Looks like it's been fixed. Should it be closed?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 27, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5383


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> 2012-10-27 10:41:17 PDT ---
(In reply to comment #1)
> This bug no longer occurs on git HEAD. Looks like it's been fixed. Should it be closed?

This is fixed in 2.059.

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