Register opaque types even when equated with infer variables #99547
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
note: This doesn't work, but it does fix #99536. Just putting this code up for other people's eyes.
The issue this attempts to solve here is that when we
Equate::tys
on an inference variable and an opaque type, we end up just storing the opaque type in the type variable table, instead of handling the opaque type as we should be doing.Thoughts on this? cc @oli-obk in particular. I'd like to work towards a real working solution if possible, if this approach has any merit.