mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 10:52:14 +00:00
Better fix
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user