made string compatible with openarray[char]
This commit is contained in:
parent
6820b2fea9
commit
f3b8a3cbbc
1 changed files with 5 additions and 0 deletions
|
|
@ -748,6 +748,11 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, doBind = true): TTypeRelation =
|
||||||
result = isConvertible
|
result = isConvertible
|
||||||
elif typeRel(c, base(f), a.sons[0]) >= isGeneric:
|
elif typeRel(c, base(f), a.sons[0]) >= isGeneric:
|
||||||
result = isConvertible
|
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
|
||||||
else: discard
|
else: discard
|
||||||
of tySequence:
|
of tySequence:
|
||||||
case a.kind
|
case a.kind
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue