privateAccess now works with ref | ptr (#17760)
This commit is contained in:
parent
d6c8efa5d4
commit
0a10af5a2c
8 changed files with 149 additions and 15 deletions
|
|
@ -17,7 +17,7 @@ when defined(nimImportutilsExample):
|
|||
x1: int # private
|
||||
proc initFoo*(): auto = Foo()
|
||||
|
||||
proc privateAccess*(t: typedesc) {.magic: "PrivateAccess".} =
|
||||
proc privateAccess*(t: typedesc[object|ref|ptr]) {.magic: "PrivateAccess".} =
|
||||
## Enables access to private fields of `t` in current scope.
|
||||
runnableExamples("-d:nimImportutilsExample"):
|
||||
# here we're importing a module containing:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue