mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
21 lines
269 B
Plaintext
21 lines
269 B
Plaintext
fn max(lhs, rhs) {
|
|
if (lhs > rhs) {
|
|
return lhs;
|
|
}
|
|
else {
|
|
return rhs;
|
|
}
|
|
}
|
|
|
|
var array = [42];
|
|
|
|
var result = null;
|
|
|
|
//problematic line
|
|
result = max(0, array[0]);
|
|
|
|
assert result == 42, "Indexing in argument list failed";
|
|
|
|
|
|
print "All good";
|