This doesn't compile, and this is _normal_ (Error: escaping reference to local a):
int[] test()
{
int a[2];
return a;
}
But this does compile (DMD 1.01) and should obviously not!
int[] test()
out{}
body
{
int a[2];
return a;
}
The problem seems to come from the out section. Removing it raises the compile time error "Error: escaping reference to local a".
Regards
--
Gilles