-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose indexing as a language interface #4370
Conversation
for some reason `clang-format` makes this unnecessary changes to the comments
I think this should be ready for review. The bulk of the test happens at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Most of my comments are for crashes on bad inputs. Checking with zygoloid I think we're also getting close to having associated type support, but since it's not ready yet, this seems good for short-term support -- we should just have some TODOs.
Co-authored-by: Jon Ross-Perkins <[email protected]>
Co-authored-by: Jon Ross-Perkins <[email protected]>
Co-authored-by: Jon Ross-Perkins <[email protected]>
Co-authored-by: Jon Ross-Perkins <[email protected]>
e2dc087
to
8ea0a6b
Compare
8ea0a6b
to
4f9702d
Compare
Thanks for the changes! It looks though like there are still test failures on toolchain/check/testdata/class/fail_redeclaration_introducer.carbon -- where did that file come from? It appears to be unrelated to the indexing change, should it be removed? |
I'm also not sure, perhaps i messed up syncing to trunk again--sorry about that! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Not really sure why are the tests failing :<< |
Head branch was pushed to by a user without write access
My bad, forgot to add |
This is in particular to avoid churn from changes such as #4370. I think the import list can be helpful (particularly to understand what the library is aware of), but it's a different trade-off for the prelude package due to the implicit imports.
This PR makes it so that types can implement the
IndexWith
interface so that they can provide their custom indexing behavior.