[Issue 9110] New: Escaping reference error from lazy variadic parameters
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Dec 2 17:30:54 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9110
Summary: Escaping reference error from lazy variadic parameters
Product: D
Version: D2
Platform: x86_64
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: rscrihf at gmail.com
--- Comment #0 from Roy Crihfield <rscrihf at gmail.com> 2012-12-02 17:30:53 PST ---
void main()
{
auto a = foo();
}
int foo(lazy int[] dgs...)
{
int res;
foreach (i, dg; dgs)
res += dg;
return res;
}
On 2.060, Fails with:
Error: escaping reference to local __arrayArg1013
Fails with any number of arguments passed.
--
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