summary refs log tree commit diff stats
path: root/tests/run/tfinalobj.nim
blob: 1cd7fae2848be8725e955494e653e2b68c862158 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
discard """
  output: "abc"
"""

type
  TA = object {.pure, final.} 
    x: string
    
var
  a: TA
a.x = "abc"

doAssert TA.sizeof == string.sizeof

echo a.x