diff options
author | cooldome <cdome@bk.ru> | 2020-01-28 13:55:54 +0000 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2020-01-28 14:55:54 +0100 |
commit | 46bfb590c856debce1a60ae0fae65ff3716dbd9a (patch) | |
tree | a94e4fcd0e2c6bdcbb8270059219e5443e453532 /tests/ccgbugs | |
parent | c8418651b190d5614e9221cc7d1ef6e1f69ac1e8 (diff) | |
download | Nim-46bfb590c856debce1a60ae0fae65ff3716dbd9a.tar.gz |
fixes #13281 (#13282)
* fixes ##13281 * add comment to test
Diffstat (limited to 'tests/ccgbugs')
-rw-r--r-- | tests/ccgbugs/tcgbug.nim | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/ccgbugs/tcgbug.nim b/tests/ccgbugs/tcgbug.nim index ba0c16fa8..db9c116be 100644 --- a/tests/ccgbugs/tcgbug.nim +++ b/tests/ccgbugs/tcgbug.nim @@ -2,6 +2,7 @@ discard """ output: ''' success M1 M2 +ok ''' """ @@ -39,7 +40,8 @@ type var k = PFuture[void]() -##bug #9297 +##bug #9297 and #13281 + import strutils type @@ -58,6 +60,14 @@ type of M2: b:float of M3: c:cstring + Helper* {.exportc: "PublicHelper".} = object + case isKind: bool + of true: + formatted: string + of false: + parsed1: string + parsed2: string + proc newMyObject(kind: MyKind, val: string): MyObject = result = MyObject(kind: kind) @@ -75,3 +85,9 @@ proc newMyObjectRef(kind: MyKind, val: string): MyObjectRef = echo newMyObject(M1, "2").kind, " ", newMyObjectRef(M2, "3").kind + + +proc test(c: Helper): string = + c.formatted + +echo test(Helper(isKind: true, formatted: "ok")) |