diff options
author | Vindaar <basti90@gmail.com> | 2018-08-27 08:35:07 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-08-27 08:35:07 +0200 |
commit | 52f03fabc12f7f0cd9ed41b55d8c03fb5319f971 (patch) | |
tree | 6a0d1688ab85d5e255ddec22597e92b27e666ddb /tests/ccgbugs | |
parent | 238809f50686f63206210e6e923c59243914b1e3 (diff) | |
download | Nim-52f03fabc12f7f0cd9ed41b55d8c03fb5319f971.tar.gz |
fixes #8781 by appending "_U" instead of 'U' (#8787)
Diffstat (limited to 'tests/ccgbugs')
-rw-r--r-- | tests/ccgbugs/t8781.nim | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/ccgbugs/t8781.nim b/tests/ccgbugs/t8781.nim new file mode 100644 index 000000000..1fa8ec8a5 --- /dev/null +++ b/tests/ccgbugs/t8781.nim @@ -0,0 +1,25 @@ +discard """ +output: "" +""" + +type + Drawable = object of RootObj + discard + + # issue #8781, following type was broken due to 'U' suffix + # on `animatedU`. U also added as union identifier for C. + # replaced by "_U" prefix, which is not allowed as an + # identifier + TypeOne = ref object of Drawable + animatedU: bool + case animated: bool + of true: + frames: seq[int] + of false: + region: float + +when isMainModule: + let r = 1.5 + let a = TypeOne(animatedU: true, + animated: false, + region: r) |