Aer/tests/operators_precedence.aer

21 lines
495 B
Plaintext

class Program {
string[] testArray() {
return {'Machine' => 'Turing'};
}
callback[] testCallback() {
return {'callme' => void() { print("Hello world\n"); }};
}
public void main() {
callback[] $constr = {'print'};
print($this->testArray()['Machine'] + "\n");
$this->testCallback()['callme']();
print(true ? "TRUE\n" : false ? "true\n" : "false\n");
(void(string $name) { print("This should work too - $name.\n");})('AerScript');
$constr[0]('Test finished.' + "\n");
}
}