--- Comment #2 from Don <> 2010-06-15 13:23:27 PDT ---
There's a few different issues involved in this.
(1) The result variable isn't mutable.
Generated opAssign will return a const(A), because the result variable is
in func.c 1114:
                if (!isVirtual())
                    v->storage_class |= STCconst;

because opAssign is not virtual. This line of code was added in svn 259 as part
of the fix for bug 3390 (out(result) contract should not be able to rebind
result). I think this line of code is wrong.

(2) The result variable isn't an lvalue.
This is the bug which was introduced in 2.031.

(3) invariant + dtor + a non-void function with this struct as parameter, has
never worked.
For example this code fails on 2.022 with "cannot goto forward into different
try block level". It's never worked.

struct A {
    invariant() {   }
    ~this() { }
    int blah(A a) { return 0; }
    void opAssign(A a) {}

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to