Better fix
This commit is contained in:
parent
e44641b6cb
commit
47c38cb98e
1 changed files with 2 additions and 2 deletions
|
|
@ -100,9 +100,9 @@ proc semEnum(c: PContext, n: PNode, prev: PType): PType =
|
||||||
of tyString, tyCString:
|
of tyString, tyCString:
|
||||||
strVal = v
|
strVal = v
|
||||||
x = counter
|
x = counter
|
||||||
of tyFloat..tyFloat128:
|
|
||||||
localError(c.config, v.info, errOrdinalTypeExpected)
|
|
||||||
else:
|
else:
|
||||||
|
if not isOrdinalType(v.typ):
|
||||||
|
localError(c.config, v.info, errOrdinalTypeExpected)
|
||||||
x = getOrdValue(v)
|
x = getOrdValue(v)
|
||||||
if i != 1:
|
if i != 1:
|
||||||
if x != counter: incl(result.flags, tfEnumHasHoles)
|
if x != counter: incl(result.flags, tfEnumHasHoles)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue