the compiler uses tyAlias internally; tester compiles again

This commit is contained in:
Araq 2016-11-16 00:13:45 +01:00
commit 0e1304a3e2
6 changed files with 49 additions and 24 deletions

View file

@ -126,8 +126,6 @@ proc hashType(c: var MD5Context, t: PType; flags: set[ConsiderFlag]) =
c &= "\254"
return
c &= char(t.kind)
case t.kind
of tyGenericInst:
var x = t.lastSon
@ -148,9 +146,14 @@ proc hashType(c: var MD5Context, t: PType; flags: set[ConsiderFlag]) =
else:
c.hashSym(t.sym)
return
of tyAlias:
c.hashType t.lastSon, flags
return
else:
discard
c &= char(t.kind)
case t.kind
of tyObject, tyEnum:
# Every cyclic type in Nim need to be constructed via some 't.sym', so this
@ -159,7 +162,7 @@ proc hashType(c: var MD5Context, t: PType; flags: set[ConsiderFlag]) =
c.hashSym(t.sym)
else:
lowlevel(t.id)
of tyRef, tyPtr, tyGenericBody, tyAlias:
of tyRef, tyPtr, tyGenericBody:
c.hashType t.lastSon, flags
of tyUserTypeClass:
if t.sym != nil and t.sym.owner != nil: