From aba1035ee48b898104ef73ee0e3c621d42e9441f Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Wed, 3 Jul 2019 01:06:29 -0700 Subject: [PATCH] address comment --- compiler/semstmts.nim | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index a2c9fa676a7e6..d77e619f9786a 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -1881,12 +1881,11 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind, c.p.wasForwarded = proto != nil maybeAddResult(c, s, n) - if lfDynamicLib notin s.loc.flags or n.sons[bodyPos] != nil: - # semantic checking for importc needed in case used in VM - s.ast[bodyPos] = hloBody(c, semProcBody(c, n.sons[bodyPos])) - # unfortunately we cannot skip this step when in 'system.compiles' - # context as it may even be evaluated in 'system.compiles': - trackProc(c, s, s.ast[bodyPos]) + # semantic checking also needed with importc in case used in VM + s.ast[bodyPos] = hloBody(c, semProcBody(c, n.sons[bodyPos])) + # unfortunately we cannot skip this step when in 'system.compiles' + # context as it may even be evaluated in 'system.compiles': + trackProc(c, s, s.ast[bodyPos]) if s.kind == skMethod: semMethodPrototype(c, s, n) else: if (s.typ.sons[0] != nil and kind != skIterator) or kind == skMacro: