mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* Add escript guide docs for classes * Add ClassInstanceRef to objref docs * Use objref.dot to generate svg
22 lines
335 B
Text
22 lines
335 B
Text
class A()
|
|
function A( this )
|
|
endfunction
|
|
endclass
|
|
|
|
class B()
|
|
function B( this )
|
|
endfunction
|
|
endclass
|
|
|
|
class C( A, B )
|
|
function C( this )
|
|
super();
|
|
endfunction
|
|
endclass
|
|
|
|
var c := C();
|
|
Print( c is @C ); // Output: 1
|
|
Print( c is @A ); // Output: 1 (since C is a subclass of A)
|
|
|
|
var b := B();
|
|
Print( b is @C ); // Output: 0
|