fixes pragmas reorder (#21205)
This commit is contained in:
parent
4032eb4baa
commit
5b20f0685c
2 changed files with 20 additions and 0 deletions
19
tests/pragmas/tpragmas_reorder.nim
Normal file
19
tests/pragmas/tpragmas_reorder.nim
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue