[Bug 179] invalid code generation with -O2 for method returning ref

via D.gnu d.gnu at puremagic.com
Sat Apr 18 13:04:44 PDT 2015


http://bugzilla.gdcproject.org/show_bug.cgi?id=179

--- Comment #6 from Iain Buclaw <ibuclaw at gdcproject.org> ---
Reduced:
---
struct SignalImpl
{
    @disable this(this);
}

struct RestrictedSignal
{
    SignalImpl mImpl;
    void connect() { }
}

struct Signal
{
    RestrictedSignal mRestricted;
}

class MyObject
{
    Signal valueChangedSg;
    ref RestrictedSignal valueChanged()
    {
        return valueChangedSg.mRestricted;
    }
}

int main ()
{
    MyObject a = new MyObject;
    a.valueChanged().connect();
    return 0;
}

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20150418/2d538200/attachment.html>


More information about the D.gnu mailing list