fixes #117
This commit is contained in:
parent
3aa36a8568
commit
af441e607f
4 changed files with 35 additions and 7 deletions
|
|
@ -72,6 +72,10 @@ proc commonType*(x, y: PType): PType =
|
|||
elif b.kind in {tyExpr, tyNil}: result = x
|
||||
elif a.kind == tyStmt: result = a
|
||||
elif b.kind == tyStmt: result = b
|
||||
elif a.kind == tyTypeDesc:
|
||||
# turn any concrete typedesc into the abstract typedesc type
|
||||
if a.sons == nil: result = a
|
||||
else: result = newType(tyTypeDesc, a.owner)
|
||||
elif b.kind in {tyArray, tyArrayConstr, tySet, tySequence} and
|
||||
a.kind == b.kind:
|
||||
# check for seq[empty] vs. seq[int]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue