treat generic body type as atomic in iterOverType #24096
Merged
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.
follows up #24095
In #24095 a check was added that used
iterOverType
to check if a type contained unresolved types, with the aim of always treatingtyGenericBody
as resolved. But the body of thetyGenericBody
is also iterated over initerOverType
, so if the body of the type actually used generic parameters (which isn't the case in the test added in #24095, but is now), the check would still count the type as unresolved.This is handled by not iterating over the children of
tyGenericBody
, the only users ofiterOverType
arecontainsGenericType
andcontainsUnresolvedType
, the first one always returns true fortyGenericBody
and the second one aims to always return false. Unfortunately this meansiterOverType
isn't as generic of an API anymore but maybe it shouldn't be used anymore for these procs.