summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorBillingsly Wetherfordshire <phowl.mouth@gmail.com>2015-06-01 07:37:36 -0500
committerBillingsly Wetherfordshire <phowl.mouth@gmail.com>2015-06-01 07:37:36 -0500
commit87c8d586b5955e8183b822016a3ebd2fcd0a821c (patch)
tree5c0bc39ed5d1199b624f68ef535e688a4f6e5ac5 /compiler
parentf3b8a3cbbcee905eb6ed0b7268180b2d872eff7d (diff)
downloadNim-87c8d586b5955e8183b822016a3ebd2fcd0a821c.tar.gz
string only matches for openarray not varargs
Diffstat (limited to 'compiler')
-rw-r--r--compiler/sigmatch.nim9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index 072890ddd..f506e3ff5 100644
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -749,10 +749,11 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, doBind = true): TTypeRelation =
       elif typeRel(c, base(f), a.sons[0]) >= isGeneric:
         result = isConvertible
     of tyString:
-      if f.sons[0].kind == tyChar:
-        result = isConvertible
-      elif f.sons[0].kind == tyGenericParam and typeRel(c, base(f), base(a)) >= isGeneric:
-        result = isConvertible
+      if f.kind == tyOpenArray:
+        if f.sons[0].kind == tyChar:
+          result = isConvertible
+        elif f.sons[0].kind == tyGenericParam and typeRel(c, base(f), base(a)) >= isGeneric:
+          result = isConvertible
     else: discard
   of tySequence:
     case a.kind