Small privateAccess improvement (#17786)

This commit is contained in:
Clyybber 2021-04-19 17:51:00 +02:00 • committed by GitHub
commit 24abe10aa8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,7 @@ when defined(nimImportutilsExample):
x1: int # private
proc initFoo*(): auto = Foo()
proc privateAccess*(t: typedesc[object|ref|ptr]) {.magic: "PrivateAccess".} =
proc privateAccess*(t: typedesc[object|(ref object)|(ptr object)]) {.magic: "PrivateAccess".} =
## Enables access to private fields of `t` in current scope.
runnableExamples("-d:nimImportutilsExample"):
# here we're importing a module containing: