mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Merge remote-tracking branch 'origin/topic/jsiwek/gh-1122'
* origin/topic/jsiwek/gh-1122: GH-165: Fix global initializations that indirectly use builtin types Improve how primary/top-level BIFs get initialized GH-1122: Allow initializing globals with calls to subdir BIFs GH-1122: Improve error for global record initialization exceptions
This commit is contained in:
commit
2a8de33c63
23 changed files with 207 additions and 70 deletions
10
src/Var.cc
10
src/Var.cc
|
@ -252,7 +252,15 @@ static void make_var(const IDPtr& id, TypePtr t, InitClass c, ExprPtr init,
|
|||
|
||||
if ( t->Tag() == TYPE_RECORD )
|
||||
{
|
||||
aggr = make_intrusive<RecordVal>(cast_intrusive<RecordType>(t));
|
||||
try
|
||||
{
|
||||
aggr = make_intrusive<RecordVal>(cast_intrusive<RecordType>(t));
|
||||
}
|
||||
catch ( InterpreterException& )
|
||||
{
|
||||
id->Error("initialization failed");
|
||||
return;
|
||||
}
|
||||
|
||||
if ( init && t )
|
||||
// Have an initialization and type is not deduced.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue