t8314.nim 326 B

12345678910111213141516171819202122232425262728
  1. discard """
  2. nimout: '''
  3. t8314.nim(14, 7) Hint: BEGIN [User]
  4. t8314.nim(25, 7) Hint: END [User]
  5. '''
  6. output: '''
  7. 1
  8. 1
  9. 1
  10. '''
  11. """
  12. {.hint: "BEGIN".}
  13. proc foo(x: range[1..10]) =
  14. block:
  15. var (y,) = (x,)
  16. echo y
  17. block:
  18. var (_,y) = (1,x)
  19. echo y
  20. block:
  21. var (y,_,) = (x,1,)
  22. echo y
  23. {.hint: "END".}
  24. foo(1)