diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index 1bb95edcff..fe8fc0956e 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -2622,7 +2622,7 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind, proc determineType(c: PContext, s: PSym) = if s.typ != nil: return #if s.magic != mNone: return - if s.ast.isNil: + if s.ast.isNil and sfForward notin s.flags: globalError(c.config, s.info, errIllFormedAstX, "symbol of kind " & $s.kind) discard semProcAux(c, s.ast, s.kind, {})