fixes #429 and tstmtexpr
This commit is contained in:
parent
4005cd1fa3
commit
b3103c4657
6 changed files with 35 additions and 22 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue