[Issue 7310] pure function results should implicitly cast to mutable, shared, and inout
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 18 12:01:47 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7310
timon.gehr at 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.gehr at 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: -------
More information about the Digitalmars-d-bugs
mailing list