Closed
Description
#67343 started using const qualification for more precise structural match warnings. The idea is that const qualification should be strictly more precise than the current type visitor (search_for_structural_match_violation
). However, const qualification is more conservative in the face of generic associated constants than the type visitor, which typically runs after substitution. This was the case in the example in #73431.
We will need to make const qualification handle all cases that search_for_structural_match_violation
does before switching away from the latter.