inline5.scm 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. ;; GitLab issue #29 "ArrayIndexOutOfBoundsException in inlineCall"
  2. (format #t "t1: ~w~%"
  3. ((lambda (#!optional x #!rest y) #f) 1))
  4. ;; Output: t1: #f
  5. (format #t "t2: ~w~%"
  6. ((lambda (#!optional (x -1) #!rest y) (list x y))))
  7. ;; Output: t2: (-1 ())
  8. (format #t "t3: ~w~%"
  9. ((lambda (#!optional (x -1) #!rest y) (list x y)) 1))
  10. ;; Output: t3: (1 ())
  11. (format #t "t4: ~w~%"
  12. ((lambda (#!optional (x -1) #!rest y) (list x y)) 1 2))
  13. ;; Output: t4: (1 (2))
  14. (format #t "t5: ~w~%"
  15. ((lambda (#!optional x (y -1) (z -2) #!rest r) (list x y z r)) 1))
  16. ;; Output: t5: (1 -1 -2 ())
  17. (format #t "t6: ~w~%"
  18. ((lambda (#!optional x (y -1) (z -2) #!rest r) (list x y z r)) 1 2))
  19. ;; Output: t6: (1 2 -2 ())
  20. (format #t "t7: ~w~%"
  21. ((lambda (#!optional x (y -1) (z -2) #!rest r) (list x y z r)) 1 2 3))
  22. ;; Output: t7: (1 2 3 ())
  23. (format #t "t8: ~w~%"
  24. ((lambda (#!optional x (y -1) (z -2) #!rest r) (list x y z r)) 1 2 3 4))
  25. ;; Output: t8: (1 2 3 (4))
  26. (format #t "t9: ~w~%"
  27. ((lambda (#!optional x (y -1) (z -2)) (list x y z)) 1))
  28. ;; Output: t9: (1 -1 -2)
  29. (format #t "t10: ~w~%"
  30. ((lambda (#!optional x (y -1) (z (+ y 100) z-seen)) (list x y z z-seen)) 1 2))
  31. ;; Output: t10: (1 2 102 #f)
  32. (format #t "t11: ~w~%"
  33. ((lambda (#!optional x (y -1) (z -2 z-seen)) (list x y z z-seen)) 1 2 3))
  34. ;; Output: t11: (1 2 3 #t)