diff --git a/compiler/astalgo.nim b/compiler/astalgo.nim index ea9534b1f7..79c386080c 100644 --- a/compiler/astalgo.nim +++ b/compiler/astalgo.nim @@ -387,6 +387,9 @@ proc debugType(n: PType, maxRecDepth=100): PRope = if n.sym != nil: app(result, " ") app(result, n.sym.name.s) + if n.kind in IntegralTypes and n.n != nil: + app(result, ", node: ") + app(result, debugTree(n.n, 2, maxRecDepth-1, renderType=true)) if (n.kind != tyString) and (sonsLen(n) > 0) and maxRecDepth != 0: app(result, "(") for i in countup(0, sonsLen(n) - 1): diff --git a/compiler/semcall.nim b/compiler/semcall.nim index 9077f34e97..56cc9dd9e6 100644 --- a/compiler/semcall.nim +++ b/compiler/semcall.nim @@ -56,6 +56,9 @@ proc pickBestCandidate(c: PContext, headSymbol: PNode, determineType(c, sym) initCandidate(c, z, sym, initialBinding, o.lastOverloadScope) z.calleeSym = sym + + #if sym.name.s == "*" and (n.info ?? "temp5.nim") and n.info.line == 140: + # gDebug = true matches(c, n, orig, z) if errors != nil: errors.safeAdd(sym) @@ -72,10 +75,13 @@ proc pickBestCandidate(c: PContext, headSymbol: PNode, if cmp < 0: best = z # x is better than the best so far elif cmp == 0: alt = z # x is as good as the best so far else: discard - #if sym.name.s == "*" and (n.info ?? "temp5.nim"): + #if sym.name.s == "*" and (n.info ?? "temp5.nim") and n.info.line == 140: # echo "Matches ", n.info, " ", typeToString(sym.typ) # debug sym # writeMatches(z) + # for i in 1 ..