src/test/01-Basic/107.ck
raw| 1 | // static function test: multiple arguments, sporked from instance |
| 2 | |
| 3 | public class Foo |
| 4 | { |
| 5 | fun static void foo( string a, int b, float c ) |
| 6 | { |
| 7 | if( a == "bar" && b == 1 && c == 4.0 ) <<< "success" >>>; |
| 8 | } |
| 9 | } |
| 10 | |
| 11 | // instantiate f |
| 12 | Foo f; |
| 13 | // spork it |
| 14 | spork ~ f.foo( "bar", 1, 4.0 ); |
| 15 | |
| 16 | // give it a chance to run |
| 17 | me.yield(); |