mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Reviewed the spec, fixed some bugs
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
|
||||
|
||||
//test nested indexing
|
||||
{
|
||||
var a = [[[0]]];
|
||||
|
||||
a[0][0][0] = 42;
|
||||
print a;
|
||||
assert a[0][0] == [42], "nested indexing failed";
|
||||
fn omitFirstInteger(arg1: int, ...rest) {
|
||||
//rest comes in as an array of any
|
||||
return rest;
|
||||
}
|
||||
|
||||
print omitFirstInteger(1, 2, 3);
|
||||
@@ -72,4 +72,14 @@
|
||||
}
|
||||
|
||||
|
||||
//test combine example
|
||||
{
|
||||
fn combine(a, b, c) {
|
||||
return [a, b, c];
|
||||
}
|
||||
|
||||
assert combine(1, 2, 3) == [1, 2, 3], "combine example failed";
|
||||
}
|
||||
|
||||
|
||||
print "All good";
|
||||
|
||||
Reference in New Issue
Block a user