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
21 lines
476 B
Text
21 lines
476 B
Text
class Item()
|
|
function Item( this, name )
|
|
this.description := name;
|
|
endfunction
|
|
endclass
|
|
|
|
class Color()
|
|
function Color( this, name )
|
|
this.color := name;
|
|
endfunction
|
|
endclass
|
|
|
|
class RedDagger( Item, Color )
|
|
function RedDagger( this )
|
|
super( Item::name:= "dagger", Color::name:= "red" ); // Using only `name` would give an ambiguous error!
|
|
endfunction
|
|
endclass
|
|
|
|
var item := RedDagger();
|
|
|
|
print( $"{item.color} {item.description}" ); // Output: red dagger
|