change approach

This commit is contained in:
Andrii Riabushenko
2018-12-09 00:05:57 +00:00
parent 5f9234e5cb
commit e03fb08c24

View File

@@ -169,8 +169,7 @@ proc ensureNoMissingOrUnusedSymbols(c: PContext; scope: PScope) =
getSymRepr(c.config, s))
inc missingImpls
elif {sfUsed, sfExported} * s.flags == {}:
if s.kind notin {skForVar, skParam, skMethod, skUnknown, skGenericParam} and
not (s.kind == skEnumField and {sfUsed, sfExported} * s.owner.flags != {}):
if s.kind notin {skForVar, skParam, skMethod, skUnknown, skGenericParam, skEnumField}:
# XXX: implicit type params are currently skTypes
# maybe they can be made skGenericParam as well.
if s.typ != nil and tfImplicitTypeParam notin s.typ.flags and