Co-authored-by: cooldome <ariabushenko@bk.ru>
This commit is contained in:
cooldome 2020-05-06 19:43:18 +01:00 • committed by GitHub
commit 6dba06f9e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 6 deletions

View file

@ -9,6 +9,7 @@ B
begin
end
prevented
(ok: true, value: "ok")
myobj destroyed
'''
"""
@ -193,3 +194,21 @@ proc test_myobject =
test_myobject()
#------------------------------------------------
# bug #14244
type
RocksDBResult*[T] = object
case ok*: bool
of true:
value*: T
else:
error*: string
proc init(): RocksDBResult[string] =
result.ok = true
result.value = "ok"
echo init()