mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 18:48:20 +00:00
parent
0815ea9188
commit
63f7359e1e
3 changed files with 20 additions and 1 deletions
|
@ -2866,7 +2866,7 @@ RecordVal::RecordVal(RecordType* t) : MutableVal(t)
|
||||||
else if ( tag == TYPE_TABLE )
|
else if ( tag == TYPE_TABLE )
|
||||||
def = new TableVal(type->AsTableType(), a);
|
def = new TableVal(type->AsTableType(), a);
|
||||||
|
|
||||||
else if ( t->Tag() == TYPE_VECTOR )
|
else if ( tag == TYPE_VECTOR )
|
||||||
def = new VectorVal(type->AsVectorType());
|
def = new VectorVal(type->AsVectorType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
5
testing/btest/Baseline/language.rec-comp-init/output
Normal file
5
testing/btest/Baseline/language.rec-comp-init/output
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
[a={
|
||||||
|
|
||||||
|
}, b={
|
||||||
|
|
||||||
|
}, c=[]]
|
14
testing/btest/language/rec-comp-init.bro
Normal file
14
testing/btest/language/rec-comp-init.bro
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# @TEST-EXEC: bro %INPUT >output 2>&1
|
||||||
|
# @TEST-EXEC: btest-diff output
|
||||||
|
|
||||||
|
# Make sure composit types in records are initialized.
|
||||||
|
|
||||||
|
type Foo: record {
|
||||||
|
a: set[count];
|
||||||
|
b: table[count] of string;
|
||||||
|
c: vector of string;
|
||||||
|
};
|
||||||
|
|
||||||
|
global f: Foo;
|
||||||
|
|
||||||
|
print f;
|
Loading…
Add table
Add a link
Reference in a new issue