[Issue 3075] void delegate(const(void)[]) should be implicitly convertable to void delegate(void[])

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jul 3 10:55:58 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3075


Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |INVALID




--- Comment #6 from Walter Bright <bugzilla at digitalmars.com>  2009-07-03 10:55:57 PDT ---
It is an implicit cast. First, the invariant of course won't change the
arguments. The problem is that the function that takes the invariant assumes
that the data is invariant, i.e. never changes. Mutable data that is implicitly
cast to invariant *can* change (because mutable aliases for the same data may
exist). Therefore, a function taking an invariant is *not* compatible with a
function taking a mutable.

For the disposition, INVALID means that the compiler works as designed, which
it does in this case. The WONTFIX still means the compiler is not working as
designed, which is not the case here. Hence, the INVALID disposition is the
correct one.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list