mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Postfix '++' & '--' works (prefix & postfix are both tested)
This commit is contained in:
@@ -9,5 +9,18 @@
|
||||
assert --a == 42;
|
||||
assert a == 42;
|
||||
|
||||
print a;
|
||||
}
|
||||
|
||||
|
||||
//increment & decrement (postfix)
|
||||
{
|
||||
var a = 42;
|
||||
assert a == 42;
|
||||
assert a++ == 42;
|
||||
assert a == 43;
|
||||
assert a-- == 43;
|
||||
assert a == 42;
|
||||
|
||||
print a;
|
||||
}
|
||||
Reference in New Issue
Block a user