[Issue 13116] Should not be able to return ref to 'this'

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jul 12 21:58:20 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13116

--- Comment #2 from hsteoh at quickfur.ath.cx ---
Attempting to do the same with returning a local variable produces a compile
error:

test.d(10): Error: escaping reference to local variable c

which is correct. So looks like 'this' was overlooked as a local variable
(albeit an implicit one) in the check for escaping references.

--


More information about the Digitalmars-d-bugs mailing list