polserver/testsuite/escript/classes/scopes-userfunc-shadowing-modfunc.src
Kevin Eady 0fa1b893a0 Update core-changes, break-changes for classes support (#719)
* Format testsuite escript

* Format testsuite pol

* Update docs
Switch "attributes" to "members" to better align with Escript terms.

* Add core-changes, breaking-changes
2024-10-10 18:06:04 +02:00

17 lines
446 B
Text

// Class defines method `Print`, shadowing `basicio::Print`. Class calls both methods
class BasicioExt()
function Print( what, i )
::Print( $"BasicioExt::Print what={what} i={i}" );
if ( i == 3 )
Print( "no-scope", i - 1 );
elseif ( i == 2 )
BasicioExt::Print( "with-scope", i - 1 );
elseif ( i == 1 )
@BasicioExt::Print( "funcref", i - 1 );
endif
endfunction
endclass
BasicioExt::Print( "root", 3 );