mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
changed dot operator to access global functions
This commit is contained in:
@@ -62,6 +62,16 @@ fn extra(one, two, ...rest) {
|
||||
extra("one", "two", "three", "four", "five", "six", "seven");
|
||||
|
||||
|
||||
//test underscore functions
|
||||
fn _example(self, a, b, c) {
|
||||
assert a == "a", "underscore failed (a)";
|
||||
assert b == "b", "underscore failed (b)";
|
||||
assert c == "c", "underscore failed (c)";
|
||||
return self;
|
||||
}
|
||||
|
||||
assert "hello world".example("a", "b", "c") == "hello world", "underscore call failed";
|
||||
|
||||
|
||||
|
||||
print "All good";
|
||||
|
||||
Reference in New Issue
Block a user