1261 – Regression from overzealous error message

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1261 - Regression from overzealous error message
Summary: Regression from overzealous error message
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: All All
: P2 regression
Assignee: Walter Bright
URL:
Keywords: rejects-valid
Depends on:
Blocks:
Reported: 2007年06月07日 07:05 UTC by Oskar Linde
Modified: 2014年02月16日 15:25 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Oskar Linde 2007年06月07日 07:05:48 UTC
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 Jari-Matti Mäkelä 2007年06月26日 14:21:50 UTC
Fixed in 1.017.


AltStyle によって変換されたページ (->オリジナル) /