GH-1534: Fix excessive coredump for duplicate enum definitions

An adequate error message was previously reported for duplicate enum
definitions, this just now prevents trying to access it as a constant in
subsequent parsing and further generating a coredump.
This commit is contained in:
Jon Siwek 2021-04-29 15:20:09 -07:00
parent af3814792a
commit 13f3cb377f
3 changed files with 15 additions and 0 deletions

View file

@ -40,3 +40,10 @@ global NOPE = 37;
redef enum a += {
NOPE,
};
type E: enum { Red, Green, Blue };
redef enum E += { Pink };
redef enum E += { Pink };
print Pink;
print Pink;