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/ccgbugs | |
parent | 383147f5cb3db55cde451902d2c11c5cee9df075 (diff) | |
download | Nim-795044ed2b9efd20ea220104ffc2894421930b2c.tar.gz |
make tests green again
Diffstat (limited to 'tests/ccgbugs')
-rw-r--r-- | tests/ccgbugs/tcgbug.nim | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/ccgbugs/tcgbug.nim b/tests/ccgbugs/tcgbug.nim index eda475d4f..ba0c16fa8 100644 --- a/tests/ccgbugs/tcgbug.nim +++ b/tests/ccgbugs/tcgbug.nim @@ -59,7 +59,7 @@ type of M3: c:cstring proc newMyObject(kind: MyKind, val: string): MyObject = - result.kind = kind + result = MyObject(kind: kind) case kind of M1: result.a = parseInt(val) @@ -67,8 +67,7 @@ proc newMyObject(kind: MyKind, val: string): MyObject = of M3: result.c = val proc newMyObjectRef(kind: MyKind, val: string): MyObjectRef = - new(result) - result.kind = kind + result = MyObjectRef(kind: kind) case kind of M1: result.a = parseInt(val) of M2: result.b = parseFloat(val) |