mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-09 06:23:25 +00:00
@@ -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.} =
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user