diff --git a/tests/operators_precedence.aer b/tests/operators_precedence.aer new file mode 100644 index 0000000..1b05de3 --- /dev/null +++ b/tests/operators_precedence.aer @@ -0,0 +1,17 @@ +class Program { + + string[] testArray() { + return {'Machine' => 'Turing'}; + } + + callback[] testCallback() { + return {'callme' => void() { print("Hello world\n"); }}; + } + + void main() { + print($this->testArray()['Machine'] + "\n"); + $this->testCallback()['callme'](); + print(true ? "TRUE\n" : false ? "true\n" : "false\n"); + } + +} diff --git a/tests/operators_precedence.exp b/tests/operators_precedence.exp new file mode 100644 index 0000000..aef213c --- /dev/null +++ b/tests/operators_precedence.exp @@ -0,0 +1,3 @@ +Turing +Hello world +TRUE