Initialisation of fields of a record : weird coerce error

Description

I have an error when compiling the Bro script below :

type T1 : record { a : int; };
local b : count = 2;
local t1 : T1 = [ $a = b ];

  1. error : line 19 and count: type clash for field "a" ((coerce [$a=b] to T1) and count)

Assigning a count to an int should not be a problem.
It works for a non-record type :
local a : int;
a = b; # no error

I suppose this is a bug ?

Environment

None

Assignee

Unassigned

Reporter

Fran├žois

Labels

External issue ID

None

Components

Affects versions

Priority

Normal
Configure