summary refs log tree commit diff stats
path: root/compiler/semexprs.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-08-04 20:11:25 +0200
committerAraq <rumpf_a@web.de>2018-08-04 20:11:25 +0200
commita18e40fa5fe3485eafb7d7e9cbac21190f4d94d7 (patch)
tree8343029af09f18e07db355a5d9f96e5eb047cedb /compiler/semexprs.nim
parent25b4d26e22c9c92bcce0626a2b50fec92a0c8a77 (diff)
parent96c6c82d5592a7a19006c0fb161a74178cea9700 (diff)
downloadNim-a18e40fa5fe3485eafb7d7e9cbac21190f4d94d7.tar.gz
Merge branch 'devel' into araq-fixes-7833
Diffstat (limited to 'compiler/semexprs.nim')
-rw-r--r--compiler/semexprs.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index d7a0d7b8b..c9f9eb33f 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -2127,7 +2127,7 @@ proc semSetConstr(c: PContext, n: PNode): PNode =
         n.sons[i] = semExprWithType(c, n.sons[i])
         if typ == nil:
           typ = skipTypes(n.sons[i].typ, {tyGenericInst, tyVar, tyLent, tyOrdinal, tyAlias, tySink})
-    if not isOrdinalType(typ):
+    if not isOrdinalType(typ, allowEnumWithHoles=true):
       localError(c.config, n.info, errOrdinalTypeExpected)
       typ = makeRangeType(c, 0, MaxSetElements-1, n.info)
     elif lengthOrd(c.config, typ) > MaxSetElements: