From 9cdd9be5a529675112b4c0e85a66061eaf0f53b7 Mon Sep 17 00:00:00 2001 From: Vindaar Date: Sat, 13 Oct 2018 08:47:58 +0200 Subject: 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 --- tests/stdlib/tmarshal.nim | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/stdlib') 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) -- cgit 1.4.1-2-gfad0