From f2ddd995393bc485880d3e56b277bad6448ad0c3 Mon Sep 17 00:00:00 2001 From: Araq Date: Mon, 30 Jul 2018 12:07:01 +0200 Subject: fixes #8425 --- compiler/semtypes.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler') 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) -- cgit 1.4.1-2-gfad0