Merge remote-tracking branch 'origin/topic/etyp/print-type-const'

* origin/topic/etyp/print-type-const:
  Fix printing type constants like `double`
This commit is contained in:
Evan Typanski 2025-03-07 13:13:39 -05:00
commit c8f8bbaccb
5 changed files with 13 additions and 2 deletions

View file

@ -1,3 +1,9 @@
7.2.0-dev.280 | 2025-03-07 13:13:39 -0500
* GH-4268: Fix printing type constants like `double` (Evan Typanski, Corelight)
Fixes #4268
7.2.0-dev.278 | 2025-03-07 11:02:12 -0700
* Fix indentation in .clang-tidy (Tim Wojtulewicz, Corelight)

View file

@ -1 +1 @@
7.2.0-dev.278
7.2.0-dev.280

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