This commit is contained in:
Andreas Rumpf 2017-02-04 21:00:07 +01:00
commit abaf5d0bdb
5 changed files with 42 additions and 6 deletions

View file

@ -1541,7 +1541,8 @@ proc skipGenericOwner*(s: PSym): PSym =
## Generic instantiations are owned by their originating generic
## symbol. This proc skips such owners and goes straight to the owner
## of the generic itself (the module or the enclosing proc).
result = if s.kind in skProcKinds and sfFromGeneric in s.flags:
result = if s.kind in skProcKinds and {sfGenSym, sfFromGeneric} * s.flags ==
{sfFromGeneric}:
s.owner.owner
else:
s.owner