diff options
Diffstat (limited to 'compiler/semtempl.nim')
-rw-r--r-- | compiler/semtempl.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim index 8882e14f3..84622f0ad 100644 --- a/compiler/semtempl.nim +++ b/compiler/semtempl.nim @@ -227,7 +227,7 @@ proc addLocalDecl(c: var TemplCtx, n: var PNode, k: TSymKind) = closeScope(c) let ident = getIdentNode(c, n) if not isTemplParam(c, ident): - if n.kind != nkSym and not (n.kind == nkIdent and n.ident.s == "_"): + if n.kind != nkSym and not (n.kind == nkIdent and n.ident.id == ord(wUnderscore)): let local = newGenSym(k, ident, c) addPrelimDecl(c.c, local) styleCheckDef(c.c, n.info, local) @@ -645,7 +645,7 @@ proc semTemplateDef(c: PContext, n: PNode): PNode = # body by the absence of the sfGenSym flag: for i in 1..<s.typ.n.len: let param = s.typ.n[i].sym - if param.name.s != "_": + if param.name.id != ord(wUnderscore): param.flags.incl sfTemplateParam param.flags.excl sfGenSym if param.typ.kind != tyUntyped: allUntyped = false |