-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Typegen fails when handling Sway type aliases #3073
Comments
It appears this is potentially an issue with From my investigation, I've created the following issue in Sway: |
Closed as this appears to be an issue in Sway: |
@petertonysmith94 Should we add some tests to validate this? They will fail at first, but they'll pass once I merge this: The issue (FuelLabs/sway#6494) was fixed in the latest forc: |
Great! Can we merge these tests, then? |
I've based off of: This is ready to go once we merge the above: |
Thank you! 🫡 |
Summary
We can define alias types in Sway. These are getting incorrectly transpiled and therefore causing the following error while running typegen:
FuelError: Type not supported: (struct std::asset_id::AssetId, struct std::asset_id::AssetId, bool)
Incoming from the forum.
Example
Consider the following contract:
The following transpile ABI is produced:
Expected
We expect to generate a
type
with signature:(_, _, _)
Actual
We actually generate a
type
with signature:(struct std::asset_id::AssetId, struct std::asset_id::AssetId, bool)
The text was updated successfully, but these errors were encountered: