http://d.puremagic.com/issues/show_bug.cgi?id=7542
timon.g...@gmx.ch changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |timon.g...@gmx.ch --- Comment #2 from timon.g...@gmx.ch 2012-02-19 05:05:58 PST --- This pull breaks the type system: void main(){ // conversion from void function(int*) to void function(inout(int)*): void function(inout(int)*) wfp = function(int*)(*p = 1;} immutable int x = 0; wfp(&x); // mutates x } The title of the bug report is correct though, contravariance is safe. Those are the safe conversions: mfp = wfp; // match inout as mutable wfp = cfp; // inout is a subtype of const cfp = wfp; // match inout as const ifp = wfp; // match inout as immutable -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------