Build a generic representing the parameterization of the body of an interface by its implicit Self
parameter.
#4190
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.
This is distinct from the generic representing the interface itself, which may or may not exist but doesn't have the
Self
parameter.For formatting purposes, I've merged the inner generic into the interface definition rather than adding a separate nested
generic
block. That seemed like the most logical option given that an interface definition is always generic and doesn't have parameters of its own, and this avoids an extra level of indentation for every interface. I'm also using the same SemIR scope name for the two generics and the interface itself, to minimize scope qualifications.This is in preparation for using specifics of the generic with self for checking
impl
s and uses of the interface rather than performing a from-scratch substitution each time.