summary refs log tree commit diff stats
path: root/compiler/sigmatch.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-08-26 14:36:46 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-08-26 14:36:46 +0200
commit98859a72486038995f66d499f76172bb6e670a22 (patch)
tree6e23973543a4402bf73d5dd8c363d68ff824e304 /compiler/sigmatch.nim
parent1d1253c87f2cba4e498db48d16cbe88fb0d8850b (diff)
downloadNim-98859a72486038995f66d499f76172bb6e670a22.tar.gz
fixes #4292
Diffstat (limited to 'compiler/sigmatch.nim')
-rw-r--r--compiler/sigmatch.nim9
1 files changed, 1 insertions, 8 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index ec429968c..949d4dc19 100644
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -1310,7 +1310,7 @@ proc localConvMatch(c: PContext, m: var TCandidate, f, a: PType,
   var call = newNodeI(nkCall, arg.info)
   call.add(f.n.copyTree)
   call.add(arg.copyTree)
-  result = c.semOverloadedCall(c, call, call, routineKinds)
+  result = c.semExpr(c, call)
   if result != nil:
     # resulting type must be consistent with the other arguments:
     var r = typeRel(m, f.sons[0], result.typ)
@@ -1320,13 +1320,6 @@ proc localConvMatch(c: PContext, m: var TCandidate, f, a: PType,
     if r == isGeneric:
       result.typ = getInstantiatedType(c, arg, m, base(f))
     m.baseTypeMatch = true
-    # bug #4545: allow the call to go through a 'var T':
-    let vt = result.sons[0].typ.sons[1]
-    if vt.kind == tyVar:
-      let x = result.sons[1]
-      let va = newNodeIT(nkHiddenAddr, x.info, vt)
-      va.add x
-      result.sons[1] = va
 
 proc incMatches(m: var TCandidate; r: TTypeRelation; convMatch = 1) =
   case r