You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Data transformer should throw an error in case of passing an ambiguous struct or enum name.
We test this behaviour for structs but tests for enums are lacking.
One need to create a new contract which uses an external enum and defines its own with identical name at the same time.
There is already an existing test for structs that can be seen here
Component the issue is related to
Cast - data transformer
Issue
Data transformer should throw an error in case of passing an ambiguous struct or enum name.
We test this behaviour for structs but tests for enums are lacking.
One need to create a new contract which uses an external enum and defines its own with identical name at the same time.
There is already an existing test for structs that can be seen here
starknet-foundry/crates/data-transformer/tests/integration.rs
Line 578 in 5306b43
Create a new test that tests ambigous enums, in similar manner as the test linked above.
Example and explanation:
Suppose we use Alexandria's
BitArray
type in our contract. We define our own struct with the same name and use it to.When calling
method
from CLI, we need to refer to these structures using paths:When called without paths, Cast will throw an error:
The text was updated successfully, but these errors were encountered: