tkeys_lent.nim 272 B

123456789101112131415161718
  1. discard """
  2. output: '''{"string": 2}'''
  3. cmd: "nim c --gc:orc $file"
  4. """
  5. import tables
  6. proc use(x: int) = echo x
  7. proc main =
  8. var tab = {"string": 1}.toTable
  9. for keyAAA in tab.keys():
  10. template alias(): untyped = tab[keyAAA]
  11. alias() = 2
  12. echo tab
  13. main()