Open ironcev opened 2 months ago
@FuelLabs/sway-compiler We've experienced this issue with the following PR. We do have a really big contract, so maybe a workaround would be to break down this contract into smaller chunks, but it would be good to get some advise on workarounds.
The below example will result in the following stack-overflow:
Note that the example contains two recursive
const
definitions,MOD_FN
andS_ASSOC/MOD_CONST
:The overflow happens only if both definitions are present. E.g., if we have only:
the compiler will emit errors.
Errors will be emitted also in this case:
The overflow happens only when both recursive definitions are present.
When fixing this issue, enable and adjust the
recursive_const_stack_overflow
test which is linked to this issue via GitHub link in the test TODO.