mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
enum types track whether they've had values added via "redef"
This commit is contained in:
parent
45004872e8
commit
341c284de9
2 changed files with 9 additions and 0 deletions
|
@ -1341,6 +1341,9 @@ void EnumType::CheckAndAddName(const string& module_name, const char* name,
|
|||
bro_int_t val, bool is_export, detail::Expr* deprecation,
|
||||
bool from_redef)
|
||||
{
|
||||
if ( from_redef )
|
||||
has_redefs = true;
|
||||
|
||||
if ( Lookup(val) )
|
||||
{
|
||||
reporter->Error("enumerator value in enumerated type definition already exists");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue