compiler finally supports 'object {.pragma.}' syntax

This commit is contained in:
Araq 2012-04-16 23:40:08 +02:00
commit cb79bf9f16
4 changed files with 25 additions and 4 deletions

16
tests/run/tfinalobj.nim Normal file
View file

@ -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