diff options
author | Billingsly Wetherfordshire <phowl.mouth@gmail.com> | 2015-06-01 06:04:22 -0500 |
---|---|---|
committer | Billingsly Wetherfordshire <phowl.mouth@gmail.com> | 2015-06-01 06:04:22 -0500 |
commit | f3b8a3cbbcee905eb6ed0b7268180b2d872eff7d (patch) | |
tree | ca847d872cb5e40d892a38b8e2e3599cd40cdff6 | |
parent | 6820b2fea919c033405e7e204343fddd947c2ef3 (diff) | |
download | Nim-f3b8a3cbbcee905eb6ed0b7268180b2d872eff7d.tar.gz |
made string compatible with openarray[char]
-rw-r--r-- | compiler/sigmatch.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 7ea2c3d6f..072890ddd 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -748,6 +748,11 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, doBind = true): TTypeRelation = result = isConvertible 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 else: discard of tySequence: case a.kind |