summary refs log tree commit diff stats
path: root/tests/destructor
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-05-27 15:57:20 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-05-27 21:29:02 +0200
commit795044ed2b9efd20ea220104ffc2894421930b2c (patch)
tree4845b33f4ec49a54c897c49101d8e3e32048f0fa /tests/destructor
parent383147f5cb3db55cde451902d2c11c5cee9df075 (diff)
downloadNim-795044ed2b9efd20ea220104ffc2894421930b2c.tar.gz
make tests green again
Diffstat (limited to 'tests/destructor')
-rw-r--r--tests/destructor/topt.nim5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/destructor/topt.nim b/tests/destructor/topt.nim
index 3851a4283..4adda1914 100644
--- a/tests/destructor/topt.nim
+++ b/tests/destructor/topt.nim
@@ -14,8 +14,7 @@ type
 proc some*[T](val: sink T): opt[T] {.inline.} =
   ## Returns an ``opt`` that has the value.
   ## nil is considered as none for reference types
-  result.exists = true
-  result.val = val
+  result = opt[T](exists: true, val: val)
 
 proc none*(T: typedesc): opt[T] {.inline.} =
   ## Returns an ``opt`` for this type that has no value.
@@ -32,7 +31,7 @@ proc unsafeGet*[T](self: opt[T]): lent T {.inline.} =
 
 type
   VSeq*[T] = object
-    len: int 
+    len: int
     data: ptr UncheckedArray[T]
 
 proc `=destroy`*[T](m: var VSeq[T]) {.inline.} =