Improve type inference for vector-of-enum constructor

This commit is contained in:
Jon Siwek 2019-07-25 13:49:41 -07:00
parent 9698d8d7cc
commit 70aa886806
5 changed files with 54 additions and 0 deletions

View 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;