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

chore: extend types tests with array with generics #1340

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

MujkicA
Copy link
Contributor

@MujkicA MujkicA commented Apr 19, 2024

Related: FuelLabs/sway#5860

Adds the above mentioned case to our tests.
Currently, it fails to compile with the experimental new encoding.

Compilation with the previous encoding scheme is successful but displays encoding issues:

assertion `left == right` failed
  left: StructWArrWGenericStruct { a: [StructWTwoGenerics { a: Bits256([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]), b: 1 }, StructWTwoGenerics { a: Bits256([0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]), b: 2 }, StructWTwoGenerics { a: Bits256([2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]), b: 3 }] }
  right: StructWArrWGenericStruct { a: [StructWTwoGenerics { a: Bits256([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]), b: 1 }, StructWTwoGenerics { a: Bits256([2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]), b: 2 }, StructWTwoGenerics { a: Bits256([3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]), b: 3 }] }

Checklist

  • I have linked to any relevant issues.
  • I have updated the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary labels.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@segfault-magnet
Copy link
Contributor

Do we close this? Leave it as a draft?

Probably shouldn't be open and blocked.

@MujkicA MujkicA marked this pull request as draft May 3, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants