http://d.puremagic.com/issues/show_bug.cgi?id=8863
--- Comment #1 from Kenji Hara <k.hara...@gmail.com> 2012-11-07 05:12:10 PST --- This is a corner case of fixing bug 8339, but I think the current behavior is intended. Let's try to replace the out parameter usage to a simple pointer in your code. auto fun(T)(T* ret) { *ret = T(); // Initialize the referred variable to T.init. // It's automatically inserted by the compiler. } void main() { struct A { auto f() {} } A a; fun!A(&a); } With current dmd the 'out' variable is initialized at the callee side, not caller side. It requires A's enclosing frame pointer for the correct initialization, but fun!A cannot access to main's frame, so compiler reports errors as you have shown. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------