From f3b8a3cbbcee905eb6ed0b7268180b2d872eff7d Mon Sep 17 00:00:00 2001 From: Billingsly Wetherfordshire Date: Mon, 1 Jun 2015 06:04:22 -0500 Subject: [PATCH] made string compatible with openarray[char] --- compiler/sigmatch.nim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 7ea2c3d6f1..072890ddd7 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