mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Fixed indexing in argument lists, resolved #102
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
fn doA() {
|
||||
print "doA()";
|
||||
return true;
|
||||
}
|
||||
import standard;
|
||||
var array = [42];
|
||||
|
||||
fn doB() {
|
||||
print "doB()";
|
||||
return true;
|
||||
}
|
||||
var result = null;
|
||||
|
||||
if (doA() || doB()) {
|
||||
print "success";
|
||||
}
|
||||
//problematic line
|
||||
result = max(0, array[0]);
|
||||
|
||||
assert result == 42, "Indexing in argument list failed";
|
||||
|
||||
|
||||
print "All good";
|
||||
|
||||
Reference in New Issue
Block a user