Better fix

This commit is contained in:
Neelesh Chandola
2018-12-11 10:34:10 +05:30
parent e44641b6cb
commit 47c38cb98e

View File

@@ -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)