http://d.puremagic.com/issues/show_bug.cgi?id=7314
Summary: strong purity should be inferred at call site Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: timon.g...@gmx.ch --- Comment #0 from timon.g...@gmx.ch 2012-01-18 12:05:05 PST --- Currently, a function is considered to be strongly pure if all its formal parameters implicitly convert to immutable. But a function invocation can be considered strongly pure if all actual arguments are implicitly convertible to immutable. The following code should compile: const(int)[] foo(const(int)[] x)pure{return x;} void main(){ immutable(int)[] x; immutable(int)[] y = foo(x); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------