polserver/testsuite/escript/classes/method-simple.src
turleypol 0259f11475
Class method if it's a method_id call now works if parameters are given (#849)
* modifed test to trigger the failure

* getParams modifies the ValueStack and thus cannot be called twice.

* docs
2026-01-10 18:12:09 +01:00

19 lines
395 B
Text

class Foo()
function Foo( this, name )
this.name := name;
endfunction
function print( this, prefix )
::print( $"{prefix}: {this.name}!" );
endfunction
function set_member( this, param )
this.print( $"succeeded with method_id call {param}" );
return "done";
endfunction
endclass
var obj := Foo( "NAME" );
obj.print( "PREFIX" );
print( obj.set_member( "param" ) );