From 1e97b420bb10af94450582cbf6774cacc45c92f4 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Wed, 22 May 2019 11:50:05 +0200 Subject: fixes #7167 (#11300) * fixes #7167 * spec: distinct types can be ordinal types * bootstrapping issue --- compiler/semexprs.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'compiler') diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 767a13f3e..268982147 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -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 -- cgit 1.4.1-2-gfad0