diff options
author | Araq <rumpf_a@web.de> | 2012-04-16 23:40:08 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-04-16 23:40:08 +0200 |
commit | cb79bf9f163225680969875d95f78d5f4aac44c0 (patch) | |
tree | a82c046f0a3969c436b8211285d0b4d088b603f4 /tests/run | |
parent | d4c2f2509c4ce94929ba9b75c16cf34f982da365 (diff) | |
download | Nim-cb79bf9f163225680969875d95f78d5f4aac44c0.tar.gz |
compiler finally supports 'object {.pragma.}' syntax
Diffstat (limited to 'tests/run')
-rw-r--r-- | tests/run/tfinalobj.nim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/run/tfinalobj.nim b/tests/run/tfinalobj.nim new file mode 100644 index 000000000..b559980d6 --- /dev/null +++ b/tests/run/tfinalobj.nim @@ -0,0 +1,16 @@ +discard """ + outp: "abc" +""" + +type + TA = object {.pure, final.} + x: string + +var + a: TA +a.x = "abc" + +doAssert TA.sizeof == string.sizeof + +echo a.x + |