terumi-project / Terumi

Terumi - Shell scripts, reinvented
MIT License
4 stars 0 forks source link

[BUG] incrementations to fields don't increment #7

Closed monoclex closed 4 years ago

monoclex commented 4 years ago

This bug is a:

Language Error:

Please enter what you typed that didn't compile:

Target code error:

Please enter what you typed that didn't work on the target language:

class Test
{
    number test

    ctor() {
        test = 0
    }

    increment() {
        test++
    }
}

main()
{
    Test instance = new Test()
    @println(instance.test)
    instance.increment()
    @println(instance.test)
}

The output should print 0, then 1, but it prints 0, then 0 both times.

monoclex commented 4 years ago

Currently works if test++ is test = test + 1.