http://d.puremagic.com/issues/show_bug.cgi?id=6588



--- Comment #1 from Kenji Hara <k.hara...@gmail.com> 2011-09-03 07:03:19 PDT ---
This is built-in opAssign issue.

When struct has only dtor, built-in opAssign is implemented automatically by
compiler with memberwise assign.

struct Task(Args...) {

    Args _args;

    this(Args args) {
        _args = args;
    }

    ~this() {}  // Bug goes away without this.

    // Inserted automatically by compiler.
    // This code does not have file positions, so error message displays
    // no position.
    ref typeof(this) opAssign(typeof(this) rhs)
    {
        this._args = rhs.args;
        // immutable field assign outside constructor causes error
        return this;
    }
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to