summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-07-30 12:07:01 +0200
committerAraq <rumpf_a@web.de>2018-07-30 12:20:58 +0200
commitf2ddd995393bc485880d3e56b277bad6448ad0c3 (patch)
treee3011371ef32cf112f78538fa4b5cd19dfb1dfec
parentd270245a0171c4532c9121e7e27dfd422f123840 (diff)
downloadNim-f2ddd995393bc485880d3e56b277bad6448ad0c3.tar.gz
fixes #8425
-rw-r--r--compiler/semtypes.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim
index 1205cc406..24896e944 100644
--- a/compiler/semtypes.nim
+++ b/compiler/semtypes.nim
@@ -136,7 +136,7 @@ proc semSet(c: PContext, n: PNode, prev: PType): PType =
     addSonSkipIntLit(result, base)
     if base.kind in {tyGenericInst, tyAlias, tySink}: base = lastSon(base)
     if base.kind != tyGenericParam:
-      if not isOrdinalType(base):
+      if not isOrdinalType(base, allowEnumWithHoles = true):
         localError(c.config, n.info, errOrdinalTypeExpected)
       elif lengthOrd(c.config, base) > MaxSetElements:
         localError(c.config, n.info, errSetTooBig)