[Issue 8408] Purity calculation should be improved
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Dec 5 17:36:11 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8408
--- Comment #6 from bearophile_hugs at eml.cc 2012-12-05 17:36:09 PST ---
Is it correct that x1 refused and x2 accepted?
char[] foo1(int[] arr) pure {
return new char[10];
}
immutable(char)[] foo2(int[] arr) pure {
return new char[10];
}
void main(string[] args) {
immutable x1 = foo1([1, 2]); // Error: cannot implicitly convert
immutable x2 = foo2([1, 2]); // OK
}
--
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