diff options
author | Zahary Karadjov <zahary@gmail.com> | 2013-05-12 21:01:39 +0300 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2013-05-12 21:01:39 +0300 |
commit | b3103c4657a3700e13f90fa1b4be888f023eb604 (patch) | |
tree | 2833423cd04e1f60ec19afab3b3b0edf85c5afa7 /compiler/sigmatch.nim | |
parent | 4005cd1fa3fa35b1ac8148a24f50364765b4b578 (diff) | |
download | Nim-b3103c4657a3700e13f90fa1b4be888f023eb604.tar.gz |
fixes #429 and tstmtexpr
Diffstat (limited to 'compiler/sigmatch.nim')
-rw-r--r-- | compiler/sigmatch.nim | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index e1882e1fb..0c6bb26e9 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -683,11 +683,12 @@ proc localConvMatch(c: PContext, m: var TCandidate, f, a: PType, proc ParamTypesMatchAux(c: PContext, m: var TCandidate, f, a: PType, arg, argOrig: PNode): PNode = var r: TTypeRelation - if f.kind == tyExpr: - if f.sonsLen == 0: + let fMaybeExpr = f.skipTypes({tyDistinct}) + if fMaybeExpr.kind == tyExpr: + if fMaybeExpr.sonsLen == 0: r = isGeneric else: - let match = matchTypeClass(m, f, a) + let match = matchTypeClass(m, fMaybeExpr, a) if match != isGeneric: r = isNone else: # XXX: Ideally, this should happen much earlier somewhere near |