Skip to content

Conversation

@RazvanN7
Copy link
Contributor

@RazvanN7 RazvanN7 commented Feb 8, 2023

This regression was introduced by #11212 (cc @kinke ).

When the array equality expression is lowered to a druntime hook, semantic analysis on the hook is performed with gagged error messages so that the failures inside it are not outputted, but rather a generic message is printed ("incompatible types for array equality"). However, there still are some checks done during the optimization phase which get silenced (in this case, an out of bounds access for static arrays). To avoid that, I am calling the optimization routine before trying semantic lowered hook.

@dlang-bot
Copy link
Contributor

dlang-bot commented Feb 8, 2023

Thanks for your pull request and interest in making D better, @RazvanN7! 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

Auto-close Bugzilla Severity Description
23674 regression incompatible types for array comparison: string and string

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 "stable + dmd#14868"

@RazvanN7 RazvanN7 changed the base branch from master to stable February 8, 2023 14:21
@RazvanN7 RazvanN7 merged commit 4463cfd into dlang:stable Feb 10, 2023
@ibuclaw ibuclaw mentioned this pull request Feb 13, 2023
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.

3 participants