[Issue 15862] dmd thinks functions are strongly pure despite mutable indirections in the return type
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Apr 1 11:59:49 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=15862
Steven Schveighoffer <schveiguy at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |schveiguy at yahoo.com
Severity|major |critical
--- Comment #1 from Steven Schveighoffer <schveiguy at yahoo.com> ---
This is very, very bad...
Tried some things.
Still fails:
int[] a1 = a();
immutable(int)[] a2 = a();
if(a1 is a2) throw ...;
changing a2 to immutable int[] seems to work.
Goes back at least as far as 2.064 (my earliest installed compiler).
I find it hard to believe we don't have widespread failures in Phobos due to
this...
--
More information about the Digitalmars-d-bugs
mailing list