tnullary_generics.nim 254 B

123456789101112131415161718192021222324252627
  1. discard """
  2. nimout: '''
  3. hah
  4. hey
  5. hey
  6. hah
  7. '''
  8. """
  9. # non-generic
  10. proc foo(s: string) =
  11. static: echo "hah"
  12. echo s
  13. static: echo "hey"
  14. foo("hoo")
  15. # nullary generic
  16. proc bar[](s: string) =
  17. static: echo "hah"
  18. echo s
  19. static: echo "hey"
  20. bar("hoo")