www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1823] New: Implicit conversion to const on associative array

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

           Summary: Implicit conversion to const on associative array
           Product: D
           Version: 2.010
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: yann.garniron yahoo.fr


"Mutable and invariant types can be implicitly converted to const."

int[int] array;
const(int[int]) a = array;

outputs:
cannot implicitly convert expression (array) of type int[int] to
const(int[int])

int[int] array;
const(int[int]) a = cast(const)array;

Compiles OK.


-- 
Feb 09 2008
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1823


bugzilla digitalmars.com changed:

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




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


-- 
Mar 06 2008