[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
Sat Nov 9 06:20:50 UTC 2024


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@jmdavis created dlang/dmd pull request #17056 "Fix bugzilla issue 24835."
fixing this issue:

- 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