Closed bbannier closed 3 months ago
Currently the Spicy operator bytes::match returns result<bytes> where result is a HILTI type we do not expose or documented anywhere in Spicy, https://github.com/zeek/spicy/blob/b1f54e4d42fb950230f70633ad74d1aac9216e18/hilti/toolchain/src/ast/operators/bytes.cc#L987-L988
bytes::match
result<bytes>
result
I would naively have expected that this should be able to return just bytes, but it seems that we rely on being able to convert the result to a boolean so simply changing the signature breaks things,
bytes
.result = {Constness::Const, builder->typeBytes()},
Currently the Spicy operator
bytes::match
returnsresult<bytes>
whereresult
is a HILTI type we do not expose or documented anywhere in Spicy, https://github.com/zeek/spicy/blob/b1f54e4d42fb950230f70633ad74d1aac9216e18/hilti/toolchain/src/ast/operators/bytes.cc#L987-L988I would naively have expected that this should be able to return just
bytes
, but it seems that we rely on being able to convert the result to a boolean so simply changing the signature breaks things,