[Issue 7543] inout opApply should work properly

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Mar 10 04:00:32 PST 2012


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



--- Comment #15 from Stewart Gordon <smjg at iname.com> 2012-03-10 04:00:38 PST ---
(In reply to comment #10)
> Even if the assert fails, it's going to be way *way* too confusing
> to have two types that are identical in syntax be actually different types
> under the hood.

Following on from my last comment, I see now that it reinforces why (b) is
better as the default behaviour.  If we went with (a), removing the inouts from
the signature of foo would completely change the meaning of the inouts in bar.

What (b) is saying is that inout is treated as referencing the constancy level
with which the function is called _only_ if it would be illegal in the absence
of an enclosing inout context.

> We *absolutely* need a new syntax if case (a) is to be included.

Would we allow it in the body of bar as well, for when we want to reference the
constancy level with which foo was called?

-- 
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