fixes #3052
This commit is contained in:
parent
f9750781c0
commit
1b4116702b
1 changed files with 3 additions and 0 deletions
|
|
@ -23,6 +23,9 @@ proc newConstraint(c: PContext, k: TTypeKind): PType =
|
||||||
|
|
||||||
proc semEnum(c: PContext, n: PNode, prev: PType): PType =
|
proc semEnum(c: PContext, n: PNode, prev: PType): PType =
|
||||||
if n.sonsLen == 0: return newConstraint(c, tyEnum)
|
if n.sonsLen == 0: return newConstraint(c, tyEnum)
|
||||||
|
elif n.sonsLen == 1:
|
||||||
|
# don't create an empty tyEnum; fixes #3052
|
||||||
|
return errorType(c)
|
||||||
var
|
var
|
||||||
counter, x: BiggestInt
|
counter, x: BiggestInt
|
||||||
e: PSym
|
e: PSym
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue