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
Using absolute paths with the new encoding will result in an error if different types have the same name.
contract;
mod contract_a_types;
mod another_lib;
use another_lib::VeryCommonNameStruct;
abi MyContract {
fn test_function(arg: contract_a_types::VeryCommonNameStruct) -> VeryCommonNameStruct;
}
impl MyContract for Contract {
fn test_function(_arg: contract_a_types::VeryCommonNameStruct) -> VeryCommonNameStruct {
VeryCommonNameStruct { field_a: 10u32 }
}
}
generates the following error:
3 |
4 | let args: (VeryCommonNameStruct,) = decode_second_param::<(VeryCommonNameStruct,)>();
5 | let result_test_function: raw_slice = encode::<VeryCommonNameStruct>(__contract_entry_test_function(args.0));
| ^^^^^^ Mismatched types.
expected: VeryCommonNameStruct
found: VeryCommonNameStruct.
help: The argument that has been provided to this function's type does not match the declared type of the parameter in the function declaration.
The text was updated successfully, but these errors were encountered:
Steps to recreate, as described in #6044 by @hal3e :
I tried it with this branch but I still get an error. Unfortunately, I do not get any specifics just: error: Could not generate the entry method. See errors above for more details. and there is nothing above :/.
Steps to recreate:
clone fuels-rs and checkout hal3e/name-clash-abi-encode
cd into fuels-rs/e2e/sway/bindings/type_paths
forc build or forc build --json-abi-with-callpaths
Using absolute paths with the new encoding will result in an error if different types have the same name.
generates the following error:
The text was updated successfully, but these errors were encountered: