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

Regression after struct and enum changed to use call paths. #3998

Closed
esdrubal opened this issue Feb 6, 2023 · 0 comments · Fixed by #4007
Closed

Regression after struct and enum changed to use call paths. #3998

esdrubal opened this issue Feb 6, 2023 · 0 comments · Fixed by #4007
Assignees
Labels
bug Something isn't working compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen P: critical Should be looked at before anything else

Comments

@esdrubal
Copy link
Contributor

esdrubal commented Feb 6, 2023

The following test case stop working:

https://github.com/FuelLabs/fuels-rs/tree/master/packages/fuels/tests/types/vectors

The regression was caused by 3fbad7b.

Printing errors with full call paths looks like:

120 |         assert(arg == expected);
    |                       ^^^^^^^^ This parameter was declared as type
std::vec::Vec<vectors::eq_impls::data_structures::SomeStruct<std::vec::Vec<std::vec::Vec<u32>>>>, but argument of type
std::vec::Vec<vectors::data_structures::SomeStruct<std::vec::Vec<std::vec::Vec<u32>>>> was provided.
121 |     }
@esdrubal esdrubal added bug Something isn't working P: critical Should be looked at before anything else compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen labels Feb 6, 2023
@esdrubal esdrubal self-assigned this Feb 6, 2023
esdrubal added a commit that referenced this issue Feb 7, 2023
The issue is that the module in which a struct or enum is can be
imported with different callpaths.

For instance we could have a struct with callpath
`my_script::data_structures::SomeStruct` in a module and in another
module as `my_script::eq_impls::data_structures::SomeStruct`. This makes
callpaths unreliable to compare declarations.

Closes #3998

Reopens #418

Disables tests multiple_enums_with_the_same_name and
multiple_structs_with_the_same_name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen P: critical Should be looked at before anything else
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant