diff options
author | flywind <43030857+xflywind@users.noreply.github.com> | 2020-11-20 16:06:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-20 09:06:18 +0100 |
commit | 6cf5ca1dc2c1c0388e0998a24d26f4a9c9b7e60e (patch) | |
tree | 2817d94f3319596aae1e87a7ea544c8d65ff7a02 /tests | |
parent | 109cc45398bcdafc22f0a5e49cdfda8234bc46de (diff) | |
download | Nim-6cf5ca1dc2c1c0388e0998a24d26f4a9c9b7e60e.tar.gz |
alternative way to fix #16022 (#16064) [backport:1.4]
* alternative way to fix #16022 * add testcase for #16022 [backport:1.4]
Diffstat (limited to 'tests')
-rw-r--r-- | tests/stdlib/tmarshal.nim | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/stdlib/tmarshal.nim b/tests/stdlib/tmarshal.nim index 315036631..d76be73f3 100644 --- a/tests/stdlib/tmarshal.nim +++ b/tests/stdlib/tmarshal.nim @@ -7,6 +7,7 @@ omega 200 Some(null) None[JsonNode] (numeric: "") +hello world ''' joinable: false """ @@ -138,7 +139,7 @@ block: echo ($$a2).to[:Option[JsonNode]] -# bug #15620 +# bug #15620 block: let str = """{"numeric": null}""" @@ -148,3 +149,9 @@ block: let test = to[LegacyEntry](str) echo test + +# bug #16022 +block: + let p: proc () = proc () = echo "hello world" + let poc = (to[typeof(p)]($$p)) + poc() |