bad-keywords1.scm 837 B

12345678910111213141516171819202122232425
  1. ;; Some tests for abuse of keywords
  2. (import (kawa arglist))
  3. (define f1 'key1:)
  4. (define f2 key1:)
  5. ;; Diagnostic: bad-keywords1.scm:4:12: warning - keyword should be quoted if not in argument position
  6. (arglist 0 k1: 3 k2: 5 8)
  7. (arglist 0 k1: 3 4 k2: 5 8)
  8. ;; Diagnostic: bad-keywords1.scm:9:20: warning - keyword separated from other keyword arguments
  9. (arglist 0 k1: 'k2: 5 8)
  10. (arglist 0 k1: k2: 5 8)
  11. ;; Diagnostic: bad-keywords1.scm:13:16: warning - missing value after unquoted keyword
  12. (arglist 0 k1: 3 'k2:)
  13. (arglist 0 k1: 3 k2:)
  14. ;; Diagnostic: bad-keywords1.scm:17:18: warning - missing value after unquoted keyword
  15. (arglist k1: k2: 5 9)
  16. ;; Diagnostic: bad-keywords1.scm:20:14: warning - missing value after unquoted keyword
  17. (arglist 5 6 k2:)
  18. ;; Diagnostic: bad-keywords1.scm:23:14: warning - missing value after unquoted keyword