Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Check access control for the generic requirements of subscripts and typealiases #23726
This is a little more involved than it should have been because the requirements on a generic typealias don't always carry a Type anymore; sometimes all you have is the TypeRepr. That should still be okay in practice as long as we don't start doing that for var/let, which can have part of a type be inferred but not all of it.
We don't have an idiom for "this should be an error in the next
slavapestov left a comment
I think long term, we'll want this kind of thing to kick off requests to get referenced decls from where clauses, etc. Right now there's an ordering dependency between having evaluated certain requests and running the code here because it relies in the decl being bound in the TypeReprs, which is fragile. Ideally we'd remove the bound decl from IdentTypeRepr altogether.