This commit is contained in:
Araq 2018-07-30 12:07:01 +02:00
commit f2ddd99539

View file

@ -136,7 +136,7 @@ proc semSet(c: PContext, n: PNode, prev: PType): PType =
addSonSkipIntLit(result, base) addSonSkipIntLit(result, base)
if base.kind in {tyGenericInst, tyAlias, tySink}: base = lastSon(base) if base.kind in {tyGenericInst, tyAlias, tySink}: base = lastSon(base)
if base.kind != tyGenericParam: if base.kind != tyGenericParam:
if not isOrdinalType(base): if not isOrdinalType(base, allowEnumWithHoles = true):
localError(c.config, n.info, errOrdinalTypeExpected) localError(c.config, n.info, errOrdinalTypeExpected)
elif lengthOrd(c.config, base) > MaxSetElements: elif lengthOrd(c.config, base) > MaxSetElements:
localError(c.config, n.info, errSetTooBig) localError(c.config, n.info, errSetTooBig)