[Bro-Dev] [JIRA] (BIT-1026) runtime error with local set of record with optional fields

Seth Hall (JIRA) jira at bro-tracker.atlassian.net
Fri Sep 4 06:26:00 PDT 2015


     [ https://bro-tracker.atlassian.net/browse/BIT-1026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Seth Hall updated BIT-1026:
---------------------------
    Resolution: No longer applies
        Status: Closed  (was: Open)

I'm going to close this since we typically recommend that people use the function-style initializers for sets/tables/vectors now.

> runtime error with local set of record with optional fields
> -----------------------------------------------------------
>
>                 Key: BIT-1026
>                 URL: https://bro-tracker.atlassian.net/browse/BIT-1026
>             Project: Bro Issue Tracker
>          Issue Type: Problem
>          Components: Bro
>    Affects Versions: git/master
>            Reporter: dmandelb
>             Fix For: 2.5
>
>
> This code:
> {noformat}
> type Foo: record {
>         a: count &optional;
>         b: count &optional;
> };
> event bro_init() {
>         local foos: set[Foo] = {};
>         add foos[[$a=0]];
>         print(foos);
> }
> {noformat}
> Gives this output:
> {noformat}
> error in <no location> and /home/dmandelb/reps/test.bro, line 7: index type doesn't match table ([a=0, b=<uninitialized>] and list of any)
> {
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.0.0-OD-02-259#70102)


More information about the bro-dev mailing list