Skip to content

lib.data: make len() work on views of array layout. #1406

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

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

wanda-phi
Copy link
Member

Fixes #1403.

@wanda-phi wanda-phi requested a review from whitequark as a code owner June 17, 2024 23:28
Copy link
Member

@whitequark whitequark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

Does this enable iteration as well? Do we need a test for that?

@whitequark whitequark added this to the 0.6 milestone Jun 17, 2024
@wanda-phi
Copy link
Member Author

it does not enable iteration, because iteration relies on indexing raising IndexError instead

@whitequark whitequark added this pull request to the merge queue Jun 17, 2024
Merged via the queue into amaranth-lang:main with commit 7a58b62 Jun 17, 2024
19 of 20 checks passed
@wanda-phi wanda-phi deleted the arraylayout-len branch June 17, 2024 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Views with an array layout should have len() applicable to them
2 participants