Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bugzilla issue 24835. #17056

Merged
merged 1 commit into from
Nov 10, 2024
Merged

Fix bugzilla issue 24835. #17056

merged 1 commit into from
Nov 10, 2024

Conversation

jmdavis
Copy link
Member

@jmdavis jmdavis commented Nov 9, 2024

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.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @jmdavis!

Bugzilla references

Auto-close Bugzilla Severity Description
24835 normal hasElaborateAssign is true for structs where opAssign is disabled if a member variable has elaborate assignment

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#17056"

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.
@LightBender
Copy link
Contributor

@WalterBright This is a blocker bug for Ranges in Phobos V3, can we get a priority review on this?
cc: @RazvanN7

@thewilsonator thewilsonator merged commit 97d1606 into dlang:master Nov 10, 2024
41 checks passed
@jmdavis jmdavis deleted the issue_24835 branch November 14, 2024 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants