usage of NimNode triggers .compileTime context; fixes #1679
This commit is contained in:
parent
14354b436f
commit
612cd25d5d
5 changed files with 16 additions and 2 deletions
|
|
@ -477,6 +477,8 @@ type
|
|||
# wildcard type.
|
||||
tfHasAsgn # type has overloaded assignment operator
|
||||
tfBorrowDot # distinct type borrows '.'
|
||||
tfTriggersCompileTime # uses the NimNode type which make the proc
|
||||
# implicitly '.compiletime'
|
||||
|
||||
TTypeFlags* = set[TTypeFlag]
|
||||
|
||||
|
|
@ -1380,6 +1382,9 @@ proc propagateToOwner*(owner, elem: PType) =
|
|||
o2.flags.incl tfHasAsgn
|
||||
owner.flags.incl tfHasAsgn
|
||||
|
||||
if tfTriggersCompileTime in elem.flags:
|
||||
owner.flags.incl tfTriggersCompileTime
|
||||
|
||||
if owner.kind notin {tyProc, tyGenericInst, tyGenericBody,
|
||||
tyGenericInvocation, tyPtr}:
|
||||
let elemB = elem.skipTypes({tyGenericInst})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue