diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2014-07-15 01:42:19 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2014-07-15 01:42:19 +0200 |
commit | 18ded6c23d72cd21fa0aa10ff61dc6f9af40832c (patch) | |
tree | 5d681c9835f01019e8ae83e14c0cd49d1a6c0d38 /compiler/sigmatch.nim | |
parent | 687a1b7de4c006750274fb046a10f08d38c22f5a (diff) | |
parent | 41bb0bf9dcccdfcebdb0f823fea8b2853b89ea4e (diff) | |
download | Nim-18ded6c23d72cd21fa0aa10ff61dc6f9af40832c.tar.gz |
Merge pull request #1363 from Araq/devel
Merge devel into master
Diffstat (limited to 'compiler/sigmatch.nim')
-rw-r--r-- | compiler/sigmatch.nim | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 4b91a067e..e5bf08097 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -62,7 +62,7 @@ type const isNilConversion = isConvertible # maybe 'isIntConv' fits better? -proc markUsed*(n: PNode, s: PSym) +proc markUsed*(info: TLineInfo, s: PSym) proc initCandidateAux(ctx: PContext, c: var TCandidate, callee: PType) {.inline.} = @@ -497,11 +497,11 @@ proc matchUserTypeClass*(c: PContext, m: var TCandidate, proc shouldSkipDistinct(rules: PNode, callIdent: PIdent): bool = if rules.kind == nkWith: for r in rules: - if r.considerAcc == callIdent: return true + if r.considerQuotedIdent == callIdent: return true return false else: for r in rules: - if r.considerAcc == callIdent: return false + if r.considerQuotedIdent == callIdent: return false return true proc maybeSkipDistinct(t: PType, callee: PSym): PType = @@ -1058,7 +1058,7 @@ proc userConvMatch(c: PContext, m: var TCandidate, f, a: PType, dest = generateTypeInstance(c, m.bindings, arg, dest) let fdest = typeRel(m, f, dest) if fdest in {isEqual, isGeneric}: - markUsed(arg, c.converters[i]) + markUsed(arg.info, c.converters[i]) var s = newSymNode(c.converters[i]) s.typ = c.converters[i].typ s.info = arg.info @@ -1271,7 +1271,7 @@ proc paramTypesMatch*(m: var TCandidate, f, a: PType, result = nil else: # only one valid interpretation found: - markUsed(arg, arg.sons[best].sym) + markUsed(arg.info, arg.sons[best].sym) result = paramTypesMatchAux(m, f, arg.sons[best].typ, arg.sons[best], argOrig) @@ -1302,7 +1302,7 @@ proc prepareOperand(c: PContext; a: PNode): PNode = proc prepareNamedParam(a: PNode) = if a.sons[0].kind != nkIdent: var info = a.sons[0].info - a.sons[0] = newIdentNode(considerAcc(a.sons[0]), info) + a.sons[0] = newIdentNode(considerQuotedIdent(a.sons[0]), info) proc arrayConstr(c: PContext, n: PNode): PType = result = newTypeS(tyArrayConstr, c) |