[Issue 24835] hasElaborateAssign is true for structs where opAssign is disabled if a member variable has elaborate assignment

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 10 08:31:33 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=24835

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #17056 "Fix bugzilla issue 24835." was merged into
master:

- db7b39cf0a2b72051ca35eb91b8a1a1c9220a5ce by Jonathan M Davis:
  Fix bugzilla issue 24835.

  I don't know why hasElaborateAssign even bothers to look at the member
  variable, since the compiler should be generating opAssign for the
  struct if any of its member variables has one, but doing that check then
  incorrectly reports that the struct has opAssign when that opAssign is
  @disabled.

  So, this fixes it so that it just checks the struct itself for opAssign.
  Ultimately, that's what matters anyway.

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

--


More information about the Digitalmars-d-bugs mailing list