privateAccess now works with ref | ptr (#17760)

This commit is contained in:
Timothee Cour 2021-04-18 15:15:58 -07:00 • committed by GitHub
commit 0a10af5a2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 149 additions and 15 deletions

View file

@ -10,8 +10,8 @@ doAssert m.m3p1 == 2
## field access
import std/importutils
privateAccess(Foo5)
# var x = Foo5(z1: "foo", z2: m.kg1)
# doAssert x.z1 == "foo"
var x = Foo5(z1: "foo", z2: m.kg1)
doAssert x.z1 == "foo"
var f0: Foo5
f0.z3 = 3