[Issue 9537] auto ref returns a reference its own stack
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Nov 22 21:55:41 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=9537
yebblies <yebblies at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yebblies at gmail.com
--- Comment #1 from yebblies <yebblies at gmail.com> 2013-11-23 16:55:39 EST ---
So does
import std.typecons;
ref foo(T)(T t)
{
return t[0];
}
void main()
{
int* p = &foo(tuple(1, 2));
}
The bug is escaping a reference to a parameter.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list