Skip to content
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

typechecker+codegen: Add index [] trait operator #1595

Merged
merged 8 commits into from
Sep 19, 2024

Conversation

alimpfard
Copy link
Member

Commits are a mess; fixes for #1592. cc @0GreenClover0.

This implements:
- Index<Integral, T> for Array<T>
- Index<Range<Integral>, ArraySlice<T>> for Array<T>
- Index<Integral, T> for ArraySlice<T>
- Index<Range<Integral>, ArraySlice<T>> for ArraySlice<T>
- Index<K, V> for Dictionary<K, V>

Co-Authored-By: 0GreenClover0 <[email protected]>
This rejects functions with the following criteria:
    Any jakt-defined function which:
        - Has a non-concrete argument type (trait name, or unknown) OR
        - Has a non-concrete known return type.
This should only affect invalid programs.
Copy link

stale bot commented Sep 19, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!

@stale stale bot added the stale label Sep 19, 2024
@alimpfard alimpfard merged commit 8d02f75 into SerenityOS:main Sep 19, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants