Fix 105, few fixes for 101 (#11148)

This commit is contained in:
genotrance 2019-05-04 15:38:52 -05:00 • committed by Andreas Rumpf
commit 45759b5e90
4 changed files with 7 additions and 4 deletions

View file

@ -123,6 +123,7 @@ proc elemType*(t: PType): PType =
case t.kind
of tyGenericInst, tyDistinct, tyAlias, tySink: result = elemType(lastSon(t))
of tyArray: result = t.sons[1]
of tyError: result = t
else: result = t.lastSon
assert(result != nil)