summary refs log tree commit diff stats
path: root/tests/js/tnilstrs.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/js/tnilstrs.nim')
-rw-r--r--tests/js/tnilstrs.nim10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/js/tnilstrs.nim b/tests/js/tnilstrs.nim
index c0048cb24..6c1e4e401 100644
--- a/tests/js/tnilstrs.nim
+++ b/tests/js/tnilstrs.nim
@@ -14,4 +14,12 @@ block:
   var x = "foo".cstring
   var y: string
   add(y, x)
-  doAssert y == "foo"
\ No newline at end of file
+  doAssert y == "foo"
+
+block:
+  type Foo = object
+    a: string
+  var foo = Foo(a: "foo")
+  var y = move foo.a
+  doAssert foo.a.len == 0
+  doAssert y == "foo"