polserver/testsuite/escript/compiler2/compiler2-110-return-assignment.src
2020-08-13 15:26:09 +02:00

10 lines
215 B
Text

var a := struct { x := 2, y := 3 };
function foo()
// There was a bug where the := was generated already consuming itself,
// but return consumes it here.
return a.x := a.y;
endfunction
print(foo());