string only matches for openarray not varargs

This commit is contained in:
Billingsly Wetherfordshire 2015-06-01 07:37:36 -05:00
commit 87c8d586b5

View file

@ -749,10 +749,11 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, doBind = true): TTypeRelation =
elif typeRel(c, base(f), a.sons[0]) >= isGeneric: elif typeRel(c, base(f), a.sons[0]) >= isGeneric:
result = isConvertible result = isConvertible
of tyString: of tyString:
if f.sons[0].kind == tyChar: if f.kind == tyOpenArray:
result = isConvertible if f.sons[0].kind == tyChar:
elif f.sons[0].kind == tyGenericParam and typeRel(c, base(f), base(a)) >= isGeneric: result = isConvertible
result = isConvertible elif f.sons[0].kind == tyGenericParam and typeRel(c, base(f), base(a)) >= isGeneric:
result = isConvertible
else: discard else: discard
of tySequence: of tySequence:
case a.kind case a.kind