digitalmars.D.bugs - [Issue 7313] New: the result of a 'new' expression should implicitly cast to (im)mutable
- d-bugmail puremagic.com (22/22) Jan 18 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7313
- d-bugmail puremagic.com (14/14) Jan 18 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7313
- d-bugmail puremagic.com (7/7) Jan 18 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7313
http://d.puremagic.com/issues/show_bug.cgi?id=7313 Summary: the result of a 'new' expression should implicitly cast to (im)mutable Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: timon.gehr gmx.ch the following code should compile: void main(){ immutable a = new int[1]; int[] b = new immutable(int)[1]; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 18 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7313 Jonathan M Davis <jmdavisProg gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jmdavisProg gmx.com Platform|Other |All OS/Version|Linux |All PST --- I can see why that would be nice with regards to primitives, but I would point out that that wouldn't work with structs or classes (or with arrays of structs or classes). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 18 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7313 It works with any type that has a pure constructor where all (unscoped) constructor arguments convert to the respective qualifier. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 18 2012