From 47c38cb98e6cde435fd38565cd374050955610eb Mon Sep 17 00:00:00 2001 From: Neelesh Chandola Date: Tue, 11 Dec 2018 10:34:10 +0530 Subject: [PATCH] Better fix --- compiler/semtypes.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index 4cc759e529..eed82adeb5 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -100,9 +100,9 @@ proc semEnum(c: PContext, n: PNode, prev: PType): PType = of tyString, tyCString: strVal = v x = counter - of tyFloat..tyFloat128: - localError(c.config, v.info, errOrdinalTypeExpected) else: + if not isOrdinalType(v.typ): + localError(c.config, v.info, errOrdinalTypeExpected) x = getOrdValue(v) if i != 1: if x != counter: incl(result.flags, tfEnumHasHoles)