tastoverload1.nim 294 B

12345678910111213141516171819202122
  1. discard """
  2. output: '''string literal
  3. no string literal
  4. no string literal'''
  5. """
  6. proc optLit(a: string{lit}) =
  7. echo "string literal"
  8. proc optLit(a: string) =
  9. echo "no string literal"
  10. const
  11. constant = "abc"
  12. var
  13. variable = "xyz"
  14. optLit("literal")
  15. optLit(constant)
  16. optLit(variable)