On Sunday, 16 August 2015 at 22:31:02 UTC, Brandon Ragland wrote:
ref MyClass doStuff(){ MyClass mc = new MyClass() // Heap allocation, using new.... return mc; }
This attempts to return a reference to the _variable_ `mc`, not a reference to the class. Just remove `ref` from the function signature.