Fix printing type constants like double

Fixes #4268
This commit is contained in:
Evan Typanski 2025-03-07 10:30:21 -05:00
parent 1d1ca92662
commit 4237239325
3 changed files with 6 additions and 1 deletions

View file

@ -3202,7 +3202,7 @@ ValPtr EnumVal::DoClone(CloneState* state) {
return {NewRef{}, this};
}
void TypeVal::ValDescribe(ODesc* d) const { d->Add(type->AsTypeType()->GetType()->GetName()); }
void TypeVal::ValDescribe(ODesc* d) const { type->AsTypeType()->GetType()->Describe(d); }
ValPtr TypeVal::DoClone(CloneState* state) {
// Immutable.

View file

@ -1,3 +1,5 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
[v=aoeu, valid=T]
type
double
vector of int

View file

@ -7,4 +7,7 @@ event zeek_init()
# Try a couple of functions that take types
print from_json("\"aoeu\"", string);
print type_name(string);
print double;
print vector of int;
}