summary refs log tree commit diff stats
path: root/compiler/sem.nim
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2023-06-17 10:24:32 +0300
committerGitHub <noreply@github.com>2023-06-17 15:24:32 +0800
commit6d2163724550ed3a115d22e00f9d40150534a8b9 (patch)
tree9e5c411a3ba7065c8bafec1703807b694988a550 /compiler/sem.nim
parent647d9611ae81c7af2c86af5b33a14787254896b5 (diff)
downloadNim-6d2163724550ed3a115d22e00f9d40150534a8b9.tar.gz
fix scoping regression with calls in generic bodies (#22115)
refs #22029, refs https://github.com/status-im/nim-libp2p/actions/runs/5263850340/jobs/9514434659
Diffstat (limited to 'compiler/sem.nim')
-rw-r--r--compiler/sem.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/sem.nim b/compiler/sem.nim
index de78667ba..ca2c6bc00 100644
--- a/compiler/sem.nim
+++ b/compiler/sem.nim
@@ -405,6 +405,8 @@ proc semExprFlagDispatched(c: PContext, n: PNode, flags: TExprFlags; expectedTyp
       evaluated = evalAtCompileTime(c, result)
       if evaluated != nil: return evaluated
 
+proc semGenericStmt(c: PContext, n: PNode): PNode
+
 include hlo, seminst, semcall
 
 proc resetSemFlag(n: PNode) =
@@ -513,8 +515,6 @@ proc semConstBoolExpr(c: PContext, n: PNode): PNode =
   result = forceBool(c, semConstExpr(c, n, getSysType(c.graph, n.info, tyBool)))
   if result.kind != nkIntLit:
     localError(c.config, n.info, errConstExprExpected)
-
-proc semGenericStmt(c: PContext, n: PNode): PNode
 proc semConceptBody(c: PContext, n: PNode): PNode
 
 include semtypes