summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorVindaar <basti90@gmail.com>2018-10-13 08:47:58 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-10-13 08:47:58 +0200
commit9cdd9be5a529675112b4c0e85a66061eaf0f53b7 (patch)
tree7f850bc8f8c14cbc71d4b7d540188da6952f60da /tests
parentc495e97ec46ab46df56087457c82d80178f7e769 (diff)
downloadNim-9cdd9be5a529675112b4c0e85a66061eaf0f53b7.tar.gz
fixes #8916 by fixing typeinfo and marshal. (#9341)
* fixes #8916 by removing `tyString`, `tySeq`, mod. marshal, typeinfo

Need to check in `typeinfo` for nil of the underlying pointer.
In marshal don't have to check for nil of seq anymore.

* remove reference to string, sequence in `isNil` doc string
Diffstat (limited to 'tests')
-rw-r--r--tests/stdlib/tmarshal.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/stdlib/tmarshal.nim b/tests/stdlib/tmarshal.nim
index 38937590f..a6fc6c1a5 100644
--- a/tests/stdlib/tmarshal.nim
+++ b/tests/stdlib/tmarshal.nim
@@ -105,3 +105,16 @@ r = to[Something](data2)
 
 echo r.x, " ", r.y
 
+
+type
+  Foo = object
+    a1: string
+    a2: string
+    a3: seq[string]
+    a4: seq[int]
+    a5: seq[int]
+    a6: seq[int]
+var foo = Foo(a2: "", a4: @[], a6: @[1])
+foo.a6.setLen 0
+doAssert $$foo == """{"a1": "", "a2": "", "a3": [], "a4": [], "a5": [], "a6": []}"""
+testit(foo)