Skip to content

For loop countinng down to 0 doesn't work #130

@veremenko-y

Description

@veremenko-y

The following code is from the examples in the README.md

// x will be 0 after the loop.
for x in 31 .. 0 by -1 {
    // ...
}

Output:

* wiz: version 0.1.2 (alpha)
>> Parsing...
>> Compiling...
src/bugtest.wiz:14: error: inequality comparison `!=` is not defined between provided operand types `u8` and `iexpr`
src/bugtest.wiz:14: error: `for` loop range of `31` ..  `0` by `-1` is not supported.
* wiz: failed with 2 error(s).

Notes

Original file to reproduce the issue
bugtest.txt
Build from b25ba2d90288fc8a380d99b3ad08a5b48caaa484 commit
Build with wiz\wiz.exe src/bugtest.wiz -o bugtest.nes command

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions