Debian Codegraph @

src/test/01-Basic/109.ck

raw
1 // static function test: calling a static function defined in a
2 // parent class, without using the dot notation
3
4 class FooParent
5 {
6 fun static void foo( string s )
7 {
8 if( s == "bar" ) <<< "success" >>>;
9 }
10 }
11
12 class Foo extends FooParent
13 {
14 fun static void start()
15 {
16 // call without dot notation e.g., f.foo(...)
17 foo( "bar" );
18 }
19 }
20
21 Foo.start();