diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-04-04 13:38:41 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-04-04 13:38:41 +0200 |
commit | bfaa32968049aed6925e53def094b8135fed328a (patch) | |
tree | 6bf125c29121eb5c010ba0e93c95ee7988e790eb /compiler/semcall.nim | |
parent | 0b79a2b02e2b6fac5245aba5eceb25234b921fc5 (diff) | |
parent | 87732f797c634b9c3ee1fbb77c0ed0c416d16db6 (diff) | |
download | Nim-bfaa32968049aed6925e53def094b8135fed328a.tar.gz |
Merge branch 'devel' into araq
Diffstat (limited to 'compiler/semcall.nim')
-rw-r--r-- | compiler/semcall.nim | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/semcall.nim b/compiler/semcall.nim index 2dd115b1b..1089ab7db 100644 --- a/compiler/semcall.nim +++ b/compiler/semcall.nim @@ -155,7 +155,7 @@ proc presentFailedCandidates(c: PContext, n: PNode, errors: CandidateErrors): renderTree(n[err.unmatchedVarParam]) & "' is immutable\n") for diag in err.diagnostics: add(candidates, diag & "\n") - + result = (prefer, candidates) proc notFoundError*(c: PContext, n: PNode, errors: CandidateErrors) = @@ -250,13 +250,11 @@ proc resolveOverloads(c: PContext, n, orig: PNode, if result.state in {csEmpty, csNoMatch}: tryOp "." - elif nfDotSetter in n.flags: - internalAssert f.kind == nkIdent and n.sonsLen == 3 + elif nfDotSetter in n.flags and f.kind == nkIdent and n.len == 3: let calleeName = newStrNode(nkStrLit, f.ident.s[0..f.ident.s.len-2]).withInfo(n.info) let callOp = newIdentNode(getIdent".=", n.info) n.sons[0..1] = [callOp, n[1], calleeName] - excl(n.flags, nfDotSetter) orig.sons[0..1] = [callOp, orig[1], calleeName] pickBest(callOp) |