[Issue 7105] relax inout rules

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 14 13:05:30 PST 2012


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



--- Comment #3 from Stewart Gordon <smjg at iname.com> 2012-02-14 13:05:25 PST ---
(In reply to comment #2)
> For example, what would be the meaning of the following declarations?
> 
> inout(int)[] delegate(inout(int)[] dg;
> inout(int)[] foo(inout(int)[]delegate(inout(int)[] dg, inout(int)[] x){ ... }

Both of these would be syntax errors, because the brackets aren't matched.

But I see the ambiguity now.  Does the inout status belong to the delegate
itself or to the function of which it is a parameter?

If the signature of dg is invalid because it doesn't pass the inout status
through, then in principle it could be taken to belong to the outer function. 
Which would be passing the inout status through to the delegate rather than as
a return.

I'll think about it and continue the discussion on the newsgroup.

Stewart.

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