compiler finally supports 'object {.pragma.}' syntax
This commit is contained in:
parent
d4c2f2509c
commit
cb79bf9f16
4 changed files with 25 additions and 4 deletions
16
tests/run/tfinalobj.nim
Normal file
16
tests/run/tfinalobj.nim
Normal 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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue