diff options
author | Araq <rumpf_a@web.de> | 2019-05-27 15:57:20 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-05-27 21:29:02 +0200 |
commit | 795044ed2b9efd20ea220104ffc2894421930b2c (patch) | |
tree | 4845b33f4ec49a54c897c49101d8e3e32048f0fa /tests/destructor | |
parent | 383147f5cb3db55cde451902d2c11c5cee9df075 (diff) | |
download | Nim-795044ed2b9efd20ea220104ffc2894421930b2c.tar.gz |
make tests green again
Diffstat (limited to 'tests/destructor')
-rw-r--r-- | tests/destructor/topt.nim | 5 |
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.} = |