diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-05-28 15:55:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-28 15:55:11 +0200 |
commit | 9d8b4d60206cc31ed87ac69723930d79fa4d2c89 (patch) | |
tree | b97533731a268b6e80f5cf9a09ac16ea5360a28b | |
parent | 1f8c9aff1f8de7294c5326c7e986779ab27f0239 (diff) | |
download | Nim-9d8b4d60206cc31ed87ac69723930d79fa4d2c89.tar.gz |
fixes #11057 (#11345)
-rw-r--r-- | compiler/modules.nim | 2 | ||||
-rw-r--r-- | compiler/sigmatch.nim | 6 | ||||
-rw-r--r-- | lib/pure/json.nim | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/compiler/modules.nim b/compiler/modules.nim index 1b8c7b958..e45c5786d 100644 --- a/compiler/modules.nim +++ b/compiler/modules.nim @@ -108,7 +108,7 @@ proc importModule*(graph: ModuleGraph; s: PSym, fileIdx: FileIndex): PSym {.proc # localError(result.info, errAttemptToRedefine, result.name.s) # restore the notes for outer module: graph.config.notes = - if s.owner.id == graph.config.mainPackageId: graph.config.mainPackageNotes + if s.owner.id == graph.config.mainPackageId or isDefined(graph.config, "booting"): graph.config.mainPackageNotes else: graph.config.foreignPackageNotes proc includeModule*(graph: ModuleGraph; s: PSym, fileIdx: FileIndex): PNode {.procvar.} = diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 8065c4992..339af007a 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -1664,6 +1664,12 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, return isGeneric result = typeRel(c, f.base, aa) if result > isGeneric: result = isGeneric + elif c.isNoCall: + if doBind: + let concrete = concreteType(c, a, f) + if concrete == nil: return isNone + put(c, f, concrete) + result = isGeneric else: result = isNone else: diff --git a/lib/pure/json.nim b/lib/pure/json.nim index 2c2b6500f..d2f0b6e5a 100644 --- a/lib/pure/json.nim +++ b/lib/pure/json.nim @@ -1472,8 +1472,7 @@ proc postProcess(node: NimNode): NimNode = # Create the type. # -> var res = Object() var resIdent = genSym(nskVar, "res") - # TODO: Placing `node[0]` inside quote is buggy - var resType = toIdentNode(node[0]) + var resType = node[0] var objConstr = newTree(nnkObjConstr, resType) result.add newVarStmt(resIdent, objConstr) |