mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-05 04:27:44 +00:00
Small privateAccess improvement (#17786)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user