This compiles, but should it? @safe ref int foo(ref int a) { return a; } @safe ref int bar() { int a; return foo(a); // leaking reference to a beyond bar's scope } -- Michel Fortin michel.fortin at michelf.com http://michelf.com/