[Issue 6912] non-transitivity of inout breaks const system
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Nov 9 06:35:44 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6912
Steven Schveighoffer <schveiguy at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |schveiguy at yahoo.com
--- Comment #1 from Steven Schveighoffer <schveiguy at yahoo.com> 2011-11-09 06:35:05 PST ---
inout a = q;
This line should fail to compile. const does not implicitly cast to inout.
Note that:
immutable a = q;
doesn't work. inout should follow the same restrictions.
I don't think this has to do with transitivity (and indeed, inout cannot
override const or immutable). It's just a simple case of inout cannot be
implicitly cast from something else.
Remember, inout can get implicitly cast back to immutable or mutable upon
function return. I don't think inout should override *any* qualifiers without
casts.
--
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