I believe it would be possible. D does something similar for auto return values on functions already. Might be a bit of work in the compiler though.