summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-08-04 20:10:03 +0200
committerAraq <rumpf_a@web.de>2018-08-04 20:10:03 +0200
commit96c6c82d5592a7a19006c0fb161a74178cea9700 (patch)
treea7124462432dda8345374a315130b83fd6ec4bc9 /compiler
parent1fa23e347eb6e61b7f0f1999c6802a60fdf213a8 (diff)
downloadNim-96c6c82d5592a7a19006c0fb161a74178cea9700.tar.gz
fixes #8425
Diffstat (limited to 'compiler')
-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: