diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-10-10 21:02:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-10 15:02:23 +0200 |
commit | d954e698b3cb849bbd8538afdcd1a42cae394719 (patch) | |
tree | 31d274de9e3a68fcb545c36b488484490bb1444a /tests/objects/tobject.nim | |
parent | b8def035755042a224b46be5b468d81c82ae2039 (diff) | |
download | Nim-d954e698b3cb849bbd8538afdcd1a42cae394719.tar.gz |
Automatic dereferencing is removed (#20531)
Diffstat (limited to 'tests/objects/tobject.nim')
-rw-r--r-- | tests/objects/tobject.nim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/objects/tobject.nim b/tests/objects/tobject.nim index 207cda0bc..a185bebcb 100644 --- a/tests/objects/tobject.nim +++ b/tests/objects/tobject.nim @@ -57,3 +57,18 @@ block: # bug #14698 x1: int x3: seq[int] doAssert t[].sizeof == Foo1.sizeof + +# bug #147 +type + TValue* {.pure, final.} = object of RootObj + a: int + PValue = ref TValue + PPValue = ptr PValue + + +var x: PValue +new x +var sp: PPValue = addr x + +sp.a = 2 +doAssert sp.a == 2 |