http://d.puremagic.com/issues/show_bug.cgi?id=7310


timon.g...@gmx.ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|strongly pure function      |pure function results
                   |results should implicitly   |should implicitly cast to
                   |cast to mutable, shared,    |mutable, shared, and inout
                   |and inout                   |
           Severity|normal                      |enhancement


--- Comment #2 from timon.g...@gmx.ch 2012-01-18 12:01:45 PST ---
Of course, there have to be some additional constraints: Namely, if the return
value should implicitly convert to <qualifier>, the function parameters all
have to implicitly convert to <qualifier>. This could even be checked at call
site:

const(int)[] foo(const(int)[] x)pure{return x;}
void main(){
    int[] x = new int[1];
    int[] y = foo(x); // perfectly fine
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to