!include once #1034831 // Gazelle 22 Function Include for Testing svoid test_leftArrowScript_tilde() { var test = new TestFunctionValues(l1 leftArrowVerbose); // function inversion with an extra argument (2 in total) test .io([[litmap "a" 2 "b" 3, ~a]], 2) .io([[litmap "a" 2 "b" 3, ~b]], 3) .io([[litmap "a" 2 "b" 3, ~c]], null) .io([[litmap "a" (litmap "x" 2) "b" 3, ~a ~x]], 2).runAndClear(); // get list element test .io([[ll "a" "b", ~0]], "a") .io([[ll "a" "b", ~1]], "b") .io([[ll "a" "b", ~2]], null) .runAndClear(); // tilde directly after function call test .io([[def bla { litmap "a" 2 } bla~a]], 2) .runAndClear(); // Any object implementing getOpt(key) test .io([[class My { def getOpt key: S { concat key "!" } } new My, ~hey ]], "hey!") .runAndClear(); }