Aer/tests/operators_precedence.aer

21 lines
495 B
Plaintext
Raw Normal View History

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