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
420 B
Text
21 lines
420 B
Text
// Do not call super() if the `this` is invalid
|
|
|
|
class BaseClass()
|
|
function BaseClass( this )
|
|
print( $"BaseClass::BaseClass this={this}" );
|
|
endfunction
|
|
endclass
|
|
|
|
class Foo( BaseClass )
|
|
function Foo( this )
|
|
super();
|
|
print( $"Foo::Foo this={this}" );
|
|
endfunction
|
|
endclass
|
|
|
|
print( Foo() );
|
|
|
|
print( "----" );
|
|
|
|
// Will call Foo() but not BaseClass(), as super() is skipped
|
|
print( @Foo.call( struct{} ) );
|