[Issue 9230] Incorrect implicit immutable conversion occurs in pure function

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 27 23:16:00 PST 2012


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



--- Comment #5 from Kenji Hara <k.hara.pg at gmail.com> 2012-12-27 23:15:58 PST ---
(In reply to comment #3)
> The patch for issue 5081 was corrent, the problem is that the definition of
> strong purity has been changed since then.

> This is the old definition of strong purity.

Hmm...interesting, and it might be true. I have thought that "the old
definition" was a conservative rule, and did proposed issue 8408 to improve it.
But, based on your talk, I have *changed* the definition of strong purity more
strictly.

I withdraw the claim that it was an implementation bug.

(In reply to comment #4)
> (In reply to comment #1)
> > Correct requirement is:
> > "If all parameters have no mutable indirections, implicit immutable conversion
> > on return statement is allowed."
> 
> Maybe it should say 'no non-immutable indirections'?

Yes, it is more exact explanation.
(I sometimes called the const qualified indirections to "mutable indirection" 
- e.g. const(int)[]. Because it is an opposite of "immutable indirection".)

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