auto ref escaping local variable
Robert burner Schadek via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jan 23 16:52:34 PST 2017
I have this program that used to compile with 72 but with 73 dmd
is complaining that
"Error: escaping reference to local variable t"
auto ref f2(T)(auto ref T t, auto ref T s) {
return t;
}
auto ref f1(T)(auto ref T t, auto ref T s) {
return f2(t, s);
}
unittest {
int a = f1(1,2);
}
I'm not sure why, or how to fix that.
https://issues.dlang.org/show_bug.cgi?id=17117
More information about the Digitalmars-d
mailing list