mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 12:38:20 +00:00
Improve type inference for vector-of-enum constructor
This commit is contained in:
parent
9698d8d7cc
commit
70aa886806
5 changed files with 54 additions and 0 deletions
9
testing/btest/language/vector-of-enum.zeek
Normal file
9
testing/btest/language/vector-of-enum.zeek
Normal file
|
@ -0,0 +1,9 @@
|
|||
# @TEST-EXEC: zeek -b %INPUT >out
|
||||
# @TEST-EXEC: btest-diff out
|
||||
|
||||
# Type inference for vector constructor comprised of enums should work fine
|
||||
# (previously the internal merge_types code did not handle enums).
|
||||
|
||||
type color: enum { Red, Green, Blue };
|
||||
global v = vector(Red, Green, Blue);
|
||||
print type_name(v), v;
|
Loading…
Add table
Add a link
Reference in a new issue