tpragmas_reorder.nim 334 B

12345678910111213141516171819
  1. discard """
  2. matrix: "--experimental:codeReordering"
  3. """
  4. runnableExamples:
  5. import strtabs
  6. var t = newStringTable()
  7. t["name"] = "John"
  8. t["city"] = "Monaco"
  9. doAssert t.len == 2
  10. doAssert t.hasKey "name"
  11. doAssert "name" in t
  12. include "system/inclrtl"
  13. {.pragma: rtlFunc, rtl.}
  14. proc hasKey*(): bool {.rtlFunc.} =
  15. discard