This commit is contained in:
Araq 2012-07-10 22:17:47 +02:00
commit 483f28d1cf
3 changed files with 21 additions and 3 deletions

View file

@ -0,0 +1,18 @@
discard """
output: "2"
"""
type
TValue* {.pure, final.} = object of TObject
a: int
PValue = ref TValue
PPValue = ptr PValue
var x: PValue
new x
var sp: PPValue = addr x
sp.a = 2
if sp.a == 2: echo 2 # with sp[].a the error is gone