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 a1afd2c6d..1ec8c07b0 100644 --- a/compiler/semtempl.nim +++ b/compiler/semtempl.nim @@ -662,10 +662,10 @@ proc semTemplateDef(c: PContext, n: PNode): PNode = localError(c.config, n[bodyPos].info, errImplOfXNotAllowed % s.name.s) elif n[bodyPos].kind == nkEmpty: localError(c.config, n.info, "implementation of '$1' expected" % s.name.s) - var proto = searchForProc(c, c.currentScope, s) + var (proto, comesFromShadowscope) = searchForProc(c, c.currentScope, s) if proto == nil: addInterfaceOverloadableSymAt(c, c.currentScope, s) - else: + elif not comesFromShadowscope: symTabReplace(c.currentScope.symbols, proto, s) if n[patternPos].kind != nkEmpty: c.patterns.add(s) |