diff options
Diffstat (limited to 'tests/pragmas/tpragmas_reorder.nim')
-rw-r--r-- | tests/pragmas/tpragmas_reorder.nim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/pragmas/tpragmas_reorder.nim b/tests/pragmas/tpragmas_reorder.nim new file mode 100644 index 000000000..c4b1a6b0a --- /dev/null +++ b/tests/pragmas/tpragmas_reorder.nim @@ -0,0 +1,19 @@ +discard """ + matrix: "--experimental:codeReordering" +""" + +runnableExamples: + import strtabs + var t = newStringTable() + t["name"] = "John" + t["city"] = "Monaco" + doAssert t.len == 2 + doAssert t.hasKey "name" + doAssert "name" in t + +include "system/inclrtl" + +{.pragma: rtlFunc, rtl.} + +proc hasKey*(): bool {.rtlFunc.} = + discard \ No newline at end of file |