[Issue 7310] New: pure function results should implicitly cast to mutable
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 18 10:51:06 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7310
Summary: pure function results should implicitly cast to
mutable
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: timon.gehr at gmx.ch
--- Comment #0 from timon.gehr at gmx.ch 2012-01-18 10:51:02 PST ---
The following code should compile
immutable(int)[] foo()pure{return new int[1];}
void main(){int[] x = foo();}
as should this (alternatively it should error out on the first line, not on the
second):
const(int)[] foo()pure{return new int[1];}
void main(){int[] x = foo();}
--
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