[Issue 2813] implicit cast (implemented via alias this) is not triggered when returning from function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue May 24 22:31:01 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=2813
Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |andrej.mitrovich at gmail.com
Resolution| |FIXED
--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2011-05-24 22:26:46 PDT ---
Works in 2.053:
struct Proxy
{
private Object o;
Object get() { return o; }
alias get this;
}
class Bar
{
Object getObject()
{
return _proxy; // should work, but doesn't
}
private Proxy _proxy;
}
void main()
{
auto bar = new Bar();
auto proxy = bar.getObject();
assert(proxy is null);
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list