Skip to content

Fix DIP1000 scope array of arrays comparison#21947

Merged
thewilsonator merged 3 commits intodlang:masterfrom
Albert24GG:fix-21945
Oct 10, 2025
Merged

Fix DIP1000 scope array of arrays comparison#21947
thewilsonator merged 3 commits intodlang:masterfrom
Albert24GG:fix-21945

Conversation

@Albert24GG
Copy link
Copy Markdown
Contributor

This PR fixes #21945. The issue was that __equals accepted only dynamic array/slice arguments, so calling it with static arrays caused an explicit cast to slice, which in turn triggered some error in the escape checking logic.

@dlang-bot
Copy link
Copy Markdown
Contributor

Thanks for your pull request and interest in making D better, @Albert24GG! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

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#21947"

@thewilsonator
Copy link
Copy Markdown
Contributor

any idea what is causing CI to fail?

@Albert24GG
Copy link
Copy Markdown
Contributor Author

I managed to fix the issue by explicitly handling static arrays through override functions. I am not sure why that test was previously failing only on windows,

@thewilsonator thewilsonator merged commit 83b76a1 into dlang:master Oct 10, 2025
43 of 44 checks passed
@dkorpel
Copy link
Copy Markdown
Contributor

dkorpel commented Oct 10, 2025

Thanks for fixing this so quickly!

dkorpel pushed a commit to dkorpel/dmd that referenced this pull request Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REG] DIP1000 scope array of arrays comparison results in weird error

4 participants