[Issue 7314] New: strong purity should be inferred at call site
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 18 12:05:07 PST 2012
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: nobody at puremagic.com
ReportedBy: timon.gehr at gmx.ch
--- Comment #0 from timon.gehr at 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: -------
More information about the Digitalmars-d-bugs
mailing list