toverload_asgn2.nim 316 B

123456789101112131415161718192021222324
  1. discard """
  2. output: '''i value 88
  3. 2aa'''
  4. disabled: "true"
  5. """
  6. import moverload_asgn2
  7. proc passAround(i: int): Concrete =
  8. echo "i value ", i
  9. result = Concrete(a: "aa", b: "bb", rc: 0)
  10. proc main =
  11. let
  12. i = 88
  13. v = passAround(i)
  14. z = v.a
  15. var
  16. x: Concrete
  17. x = v
  18. echo x.rc, z # 2aa
  19. main()