Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix recursive error for constraints depending on itself incorrectly
Fixes: #60323 #60323 The problem is that we are profiling the 'Expr' components directly, however when they contain an unresolved lookup, those canonicalize identically. The result was the two versions of calls to 'go' were canonicalized identically. This patch fixes this by ensuring we consider the declaration the constraint is attached to, when possible. When not, we skip the diagnostic. The result is that we are relaxing our diagnostic in some cases (Of which I couldn't come up with a reproducer), such that we might see overflows when evaluating constraints that depend on themselves in a way that they are not attached to a declaration directly, such as if they are nested requirements, though the hope is this won't be a problem, since the 'parent' named constraint would catch this. I'm hopeful that the 'worst case' is that we catch recursion 'later' in the process, instead of immediately.
- Loading branch information
Erich Keane
committed
Jan 27, 2023
1 parent
9f307a0
commit 4266756
Showing
3 changed files
with
65 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters