[Issue 629] New: Misleading error message "Can only append to dynamic arrays"

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Dec 2 11:59:45 PST 2006


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 at digitalmars.com
        ReportedBy: deewiant at 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.


-- 




More information about the Digitalmars-d-bugs mailing list