mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00

Attributes have state to track whether they're in a record and should apply to a record field, but this state wasn't being set for TypeDecls that are part of a redef'd record. Closes #460
21 lines
392 B
Text
21 lines
392 B
Text
# @TEST-EXEC: bro %INPUT >output
|
|
# @TEST-EXEC: btest-diff output
|
|
|
|
type Foo: record {
|
|
a: count;
|
|
b: count &optional;
|
|
myset: set[count] &default=set();
|
|
};
|
|
|
|
redef record Foo += {
|
|
c: count &default=42;
|
|
d: count &optional;
|
|
anotherset: set[count] &default=set();
|
|
};
|
|
|
|
global f1: Foo = [$a=21];
|
|
global f2: Foo = [$a=21, $d="XXX"];
|
|
|
|
print f1;
|
|
print f2;
|
|
|