diff options
author | Araq <rumpf_a@web.de> | 2012-07-24 07:39:23 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-07-24 07:39:23 +0200 |
commit | 09a4c2f0ad0f59cfb9ca7be793990e3b755e6c6f (patch) | |
tree | 0db5b5060e03f38d67e17b3f61f8f35d0eb30f39 | |
parent | 583e036bbd2622b3e3fab0f87db50162250124e5 (diff) | |
download | Nim-09a4c2f0ad0f59cfb9ca7be793990e3b755e6c6f.tar.gz |
bugfix: bind context for generics
-rwxr-xr-x | compiler/semgnrc.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/semgnrc.nim b/compiler/semgnrc.nim index f7e64bdee..59e8a2dff 100755 --- a/compiler/semgnrc.nim +++ b/compiler/semgnrc.nim @@ -68,16 +68,16 @@ proc semGenericStmt(c: PContext, n: PNode, result = n if gCmd == cmdIdeTools: suggestStmt(c, n) case n.kind - of nkIdent: + of nkIdent, nkAccQuoted: var s = SymtabGet(c.Tab, n.ident) if s == nil: # no error if symbol cannot be bound, unless in ``bind`` context: if withinBind in flags: localError(n.info, errUndeclaredIdentifier, n.ident.s) else: - if withinBind in flags or s.name.id in toBind: result = symChoice(c, n, s) + if withinBind in flags or s.id in toBind: result = symChoice(c, n, s) else: result = semGenericStmtSymbol(c, n, s) - of nkDotExpr: + of nkDotExpr: var s = QualifiedLookUp(c, n, {}) if s != nil: result = semGenericStmtSymbol(c, n, s) # XXX for example: ``result.add`` -- ``add`` needs to be looked up here... |