FuelLabs / sway

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

ICE: Internal compiler error: Block while has a misplaced terminator. #6205

Closed Braqzen closed 3 months ago

Braqzen commented 3 months ago

Forc: latest (0.60.0)

Repro: forc build

contract;

abi TestContract {
    fn test_method();
}

impl TestContract for Contract {
    fn test_method() {
        while (true && true) {}
    }
}

Context: the issue is having more than one &&. I've reduced this from a massive codebase. I have not attempted to try different combinations (logical or otherwise)

Braqzen commented 3 months ago

cc @IGI-111 this is urgent for a known project integration

ironcev commented 3 months ago

This issue is fixed with #6146 and the code compiles with Forc 0.61.1.