Then only the last copy of foo is kept as part of the processed trait's definition.
This means that we can then successfully launch a contract like the following:
Steps To Reproduce
If the first contract is stored in a file double-trait.clar and the second contract is stored in a file impl-double-trait.clar, then the CLI invocation to test would be:
Expected behavior
I expect that the type checker will reject contracts with traits that contain two function signatures with the same name, even if they are identical otherwise.
Environment (please complete the following information):
Thanks for your report! We're looking into it. A proper fix would be to address this in the 2.1 upgrade, but in all likelihood the tooling could also warn against this.
Describe the bug On master branch, when a contract contains a trait definition like the following:
Then only the last copy of
foo
is kept as part of the processed trait's definition. This means that we can then successfully launch a contract like the following:Steps To Reproduce If the first contract is stored in a file
double-trait.clar
and the second contract is stored in a fileimpl-double-trait.clar
, then the CLI invocation to test would be:Expected behavior I expect that the type checker will reject contracts with traits that contain two function signatures with the same name, even if they are identical otherwise.
Environment (please complete the following information):
Additional context N/A