www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 629] New: Misleading error message "Can only append to dynamic arrays"

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=629

           Summary: Misleading error message "Can only append to dynamic
                    arrays"
           Product: D
           Version: 0.175
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: trivial
          Priority: P5
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: deewiant gmail.com


void main() {
        real[] array;
        array ~= "string";
}

The error message emitted from the above code is somewhat misleading: "[c]an
only append to dynamic arrays, not real[] ~= char[6]". real[] _is_ a dynamic
array, just of the wrong type.


-- 
Dec 02 2006
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=629


bugzilla digitalmars.com changed:

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




------- Comment #1 from bugzilla digitalmars.com  2007-07-01 13:26 -------
Fixed DMD 1.018 and DMD 2.002


-- 
Jul 01 2007