Bug 1261 – Regression from overzealous error message
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2007-06-07T07:05:00Z
Last change time
2014-02-16T15:25:47Z
Keywords
rejects-valid
Assigned to
bugzilla
Creator
oskar.linde
Comments
Comment #0 by oskar.linde — 2007-06-07T07:05:48Z
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.
Comment #1 by onlystupidspamhere — 2007-06-26T14:21:50Z