diff options
Diffstat (limited to 'tests/stdlib/toptions.nim')
-rw-r--r-- | tests/stdlib/toptions.nim | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/stdlib/toptions.nim b/tests/stdlib/toptions.nim index 71c52a07e..63a10e746 100644 --- a/tests/stdlib/toptions.nim +++ b/tests/stdlib/toptions.nim @@ -1,9 +1,13 @@ discard """ + matrix: "--mm:refc; --mm:orc" targets: "c js" """ import std/[json, options] +import std/assertions +import std/objectdollar + # RefPerson is used to test that overloaded `==` operator is not called by # options. It is defined here in the global scope, because otherwise the test @@ -192,6 +196,12 @@ proc main() = doAssert x.isNone doAssert $x == "none(cstring)" - static: main() main() + +when not defined(js): + block: # bug #22932 + var it = iterator: int {.closure.} = discard + doAssert it.option.isSome # Passes. + it = nil + doAssert it.option.isNone # Passes. |