timports.nim 686 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. discard """
  2. output: '''
  3. 317
  4. TEST2
  5. 5 5 5
  6. false
  7. '''
  8. """
  9. import mbind_bracket, mclosed_sym, mdotlookup, mmodule_same_as_proc
  10. block tbind_bracket:
  11. # bug #2599
  12. # also test that `[]` can be passed now as a first class construct:
  13. template takeBracket(x, a, i: untyped) =
  14. echo x(a, i)
  15. var a: array[10, int]
  16. a[8] = 317
  17. takeBracket(`[]`, a, 8)
  18. let reg = newRegistry[UUIDObject]()
  19. reg.register(UUIDObject())
  20. block tclosed_sym:
  21. # bug #2664
  22. proc same(r:R, d:int) = echo "TEST1"
  23. doIt(Data[int](d:123), R())
  24. block tdotlookup:
  25. foo(7)
  26. # bug #1444
  27. fn(4)
  28. block tmodule_same_as_proc:
  29. # bug #1965
  30. proc test[T](t: T) =
  31. mmodule_same_as_proc"a"
  32. test(0)