polserver/testsuite/escript/classes/scopes-var-assignment.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

23 lines
473 B
Text

// Testing assignment of global, class, and local variables.
var foo := "global before";
class Animal()
var foo := "class before";
// static function named as same as class
function Animal( foo )
print( foo );
print(::foo);
print( Animal::foo);
Animal::foo:= "class after";
foo := "param after";
::foo:= "global after";
print( foo );
print(::foo);
print( Animal::foo);
endfunction
endclass
Animal::Animal( "param before" );