* fixes #7167
* spec: distinct types can be ordinal types
* bootstrapping issue
This commit is contained in:
Andreas Rumpf 2019-05-22 11:50:05 +02:00 • committed by GitHub
commit 1e97b420bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 4 deletions

View file

@ -338,8 +338,7 @@ proc semLowHigh(c: PContext, n: PNode, m: TMagic): PNode =
of tyArray:
n.typ = typ.sons[0] # indextype
of tyInt..tyInt64, tyChar, tyBool, tyEnum, tyUInt8, tyUInt16, tyUInt32, tyFloat..tyFloat64:
# do not skip the range!
n.typ = n.sons[1].typ.skipTypes(abstractVar)
n.typ = n.sons[1].typ.skipTypes({tyTypeDesc})
of tyGenericParam:
# prepare this for resolving in semtypinst:
# we must use copyTree here in order to avoid creating a cycle