Repro:
Code: Select all
class Test : Actor {
int varA;
Array<int> varB;
clearscope void Foo (out int a) { a++; }
clearscope void Bar (out Array<int> b) {
let toPush = 0;
if (b.Size () > 0)
toPush = b [b.Size () - 1] + 1;
b.Push (toPush);
}
ui void UIFunc () {
varA++; // ERROR: Argument must be a modifiable value
varB.Push (1234); // ERROR: Readonly struct on left hand side of Push not allowed
Foo (varA); // ERROR: Argument must be a modifiable value
Bar (varB); // !!No error!!
}
}