Closed petertonysmith94 closed 3 weeks ago
It appears this is potentially an issue with forc
rather than the transpiler - more to follow.
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 (https://github.com/FuelLabs/sway/pull/6494) was fixed in the latest forc:
@arboleya We have tests here for an aliased type.
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:
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)