yebblies <> changed:

           What    |Removed                     |Added
           Keywords|                            |accepts-invalid, patch
                 CC|                            |

--- Comment #3 from yebblies <> 2011-06-12 08:14:13 PDT ---

When implicitly converting types with indirections, only allow the following
> completely mutable
> completely non-mutable
> exactly one mutable indirection
> the same number of mutable indirections as before

> T*** => const(T***)   allowed, full const
> T*** => const(T**)*   allowed, tail const
> T*** => const(T*)**   not allowed
> T*** => const(T)***   not allowed
> T*** => T***          allowed, same number of mutable indirections
> immutable(T*)** => const(T*)** allowed, same number of mutable indirections

This prevents (as far as I know) using implicit conversions to let a pointer to
mutable and a pointer to immutable point to the same place using const

int** a = [new int].ptr;
const(int)*** b = &a;
*b = [new immutable(int)].ptr;

The same applies to other reference types.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to