mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* Format testsuite escript * Format testsuite pol * Update docs Switch "attributes" to "members" to better align with Escript terms. * Add core-changes, breaking-changes
30 lines
536 B
Text
30 lines
536 B
Text
|
|
class Animal()
|
|
function Animal( this, name )
|
|
this.name := name;
|
|
endfunction
|
|
endclass
|
|
|
|
class Walker()
|
|
function Walker( this, walk_speed )
|
|
this.walk_speed := walk_speed;
|
|
endfunction
|
|
function Speak( this )
|
|
print( "Woof!" );
|
|
endfunction
|
|
endclass
|
|
|
|
class Dog( Animal, Walker )
|
|
var static_var;
|
|
|
|
function Dog( this, name, breed, speed )
|
|
Animal( name );
|
|
Walker( speed );
|
|
this.walk_speed := walk_speed;
|
|
endfunction
|
|
endclass
|
|
|
|
// var dog := Dog(name, breed, speed);
|
|
// dog.Speak( );
|
|
|
|
// Dog.Speak( dog );
|