[Issue 1261] New: Regression from overzealous error message
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jun 7 05:05:49 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1261
Summary: Regression from overzealous error message
Product: D
Version: 1.005
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: regression
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: oskar.linde at gmail.com
int[] test(int[2] x) { return x; }
Gives (with dmd 1.005 and later):
Error: escaping reference to local x
Since static arrays (at least in Dv1) are passed by reference, the x above
wouldn't be local. The sample compiles fine with all D versions (that I've
tested) up to and including 1.004.
The regression was probably introduced by fixing issue 890.
--
More information about the Digitalmars-d-bugs
mailing list