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

--- Comment #0 from 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:
------- You are receiving this mail because: -------

Reply via email to