FuelLabs / sway

🌴 Empowering everyone to build reliable and efficient smart contracts.
https://docs.fuel.network/docs/sway/
Apache License 2.0
62.58k stars 5.37k forks source link

Misleading error message in case of recursively defined constants #6534

Open ironcev opened 2 months ago

ironcev commented 2 months ago

The following recursive constant definition:

pub const A: u8 = B;
pub const B: u8 = A;

results in a misleading error message:

Type A is recursive via B, which is unsupported at this time.

When fixing this issue, adjust the recursive_const_... tests which are linked to this issue via GitHub link in the test TODO.