diff options
Diffstat (limited to 'tests/arc/tcaseobj.nim')
-rw-r--r-- | tests/arc/tcaseobj.nim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/arc/tcaseobj.nim b/tests/arc/tcaseobj.nim index 99ea19fa2..dd02675cc 100644 --- a/tests/arc/tcaseobj.nim +++ b/tests/arc/tcaseobj.nim @@ -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() |