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

fix: handle slice of array type #5297

Closed
wants to merge 2 commits into from
Closed

fix: handle slice of array type #5297

wants to merge 2 commits into from

Conversation

guipublic
Copy link
Contributor

Description

Problem*

Resolves #5245

Summary*

Add support of slices of array type

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

Comment on lines +220 to +222
// A literal slice can be an array or a slice,
// however we convert the array into a slice because printable types
// do not handle slice array properly.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you elaborate on this comment? A literal slice should only be a slice and never an array since we removed the polymorphism a while back

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps the issue is with modulus_be_bytes and possibly other builtin functions returning arrays when they should return slices or vice-versa

@TomAFrench
Copy link
Member

This error is likely just a consequence of this issue: #5278

@jfecher
Copy link
Contributor

jfecher commented Jun 20, 2024

This error is likely just a consequence of this issue: #5278

Agreed. We should test this PR again after that one merges. If it is fixed we can close it.

@TomAFrench
Copy link
Member

TomAFrench commented Jun 20, 2024

@guipublic The test program in this PR now passes in master so I think we can just close this PR

@guipublic
Copy link
Contributor Author

closing as fixed by #5297

@guipublic guipublic closed this Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Usage of .as_array() method on slice results in panic during inlining
3 participants