This commit is contained in:
Araq
2015-08-02 02:54:43 +02:00
parent f9750781c0
commit 1b4116702b

View File

@@ -23,6 +23,9 @@ proc newConstraint(c: PContext, k: TTypeKind): PType =
proc semEnum(c: PContext, n: PNode, prev: PType): PType =
if n.sonsLen == 0: return newConstraint(c, tyEnum)
elif n.sonsLen == 1:
# don't create an empty tyEnum; fixes #3052
return errorType(c)
var
counter, x: BiggestInt
e: PSym