www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1806] New: "const" makes typesafe variadic arguments not work properly.

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

           Summary: "const" makes typesafe variadic arguments not work
                    properly.
           Product: D
           Version: 2.010
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: burton-radons shaw.ca


This code:

        void a (const int [] data...)
        {
                a (1);
        }

Fails compilation with the mysterious error message "Error: __arrayArg1[0u] is
not mutable". Removing "const" allows it to compile; however, that makes this
not work:

        void a (int [] data...)
        {
                const int [] foo;

                a (foo);
        }


-- 
Jan 25 2008
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1806


bugzilla digitalmars.com changed:

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




------- Comment #1 from bugzilla digitalmars.com  2008-03-07 00:26 -------
Fixed dmd 2.012


-- 
Mar 06 2008