July 06, 2023
https://issues.dlang.org/show_bug.cgi?id=24024

Tim <tim.dlang@t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=24034

--
July 06, 2023
https://issues.dlang.org/show_bug.cgi?id=24024

Tim <tim.dlang@t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=24035

--
November 01, 2023
https://issues.dlang.org/show_bug.cgi?id=24024

--- Comment #11 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #15637 "[stable] Revert "fix Issue 24024 - cannot pass class this to ref class"" was merged into stable:

- 1fed77b1e597280e91823a47310867e8df91f748 by Martin Kinkelin:
  Revert "fix Issue 24024 - cannot pass class this to ref class (#15389)"

  This reverts commit 2ee383b7908a0e2a72eb14ad3e9ca94c64d58a81.

  Conflicts:
        compiler/src/dmd/expression.d

https://github.com/dlang/dmd/pull/15637

--
November 01, 2023
https://issues.dlang.org/show_bug.cgi?id=24024

--- Comment #12 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #15771 "merge stable" was merged into master:

- 8a8d03d88a7a17082aca132f1be776f945cdda85 by Martin Kinkelin:
  [stable] Revert "fix Issue 24024 - cannot pass class this to ref class"
(#15637)

  * Revert "fix Issue 24024 - cannot pass class this to ref class (#15389)"

  This reverts commit 2ee383b7908a0e2a72eb14ad3e9ca94c64d58a81.

  Conflicts:
        compiler/src/dmd/expression.d

  * Revert "Update C++ headers (#15396)"

  This reverts commit 3a1e24922d462e5c477fd5753ff46819722310f0.

  * Add test case for Issue 24157 - [REG2.105] class `this` as lvalue leads to
memory corruption

https://github.com/dlang/dmd/pull/15771

--
November 08, 2023
https://issues.dlang.org/show_bug.cgi?id=24024

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |ibuclaw@gdcproject.org
         Resolution|FIXED                       |---

--- Comment #13 from Iain Buclaw <ibuclaw@gdcproject.org> ---
Reverted.

--
November 27, 2023
https://issues.dlang.org/show_bug.cgi?id=24024

anonymous4 <dfj1esp02@sneakemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=24157

--
January 12, 2024
https://issues.dlang.org/show_bug.cgi?id=24024

ZombineDev <petar.p.kirov@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
                 CC|                            |petar.p.kirov@gmail.com
         Resolution|---                         |WONTFIX

--- Comment #14 from ZombineDev <petar.p.kirov@gmail.com> ---
Given the issues the (now reverted) dmd PR
(https://github.com/dlang/dmd/pull/15389) caused, I'd err on the side of
caution and mark this as won't fix.

Just for reference, C# (I tested .NET 8) also rejects treating `this` as an
lvalue:

```csharp
C c = new C();
c.mem();

class C
{
        public void mem()
        {
                foo(ref this);
                this = new C();
        }

        static void foo(ref C c)
        {
                c = null;
        }
}
```

Compilation error (line 8, col 11): Cannot use 'this' as a ref or out value
because it is read-only
Compilation error (line 9, col 3): Cannot assign to 'this' because it is
read-only

--
1 2
Next ›   Last »