diff --git a/src/script_opt/FuncInfo.cc b/src/script_opt/FuncInfo.cc index 2a962e7dc7..a1499e7eae 100644 --- a/src/script_opt/FuncInfo.cc +++ b/src/script_opt/FuncInfo.cc @@ -471,7 +471,7 @@ static std::unordered_map func_attrs = { {"to_addr", ATTR_IDEMPOTENT}, // can error {"to_count", ATTR_IDEMPOTENT}, // can error {"to_double", ATTR_IDEMPOTENT}, // can error - {"to_int", ATTR_FOLDABLE}, + {"to_int", ATTR_IDEMPOTENT}, // can error {"to_json", ATTR_FOLDABLE}, {"to_lower", ATTR_FOLDABLE}, {"to_port", ATTR_IDEMPOTENT}, // can error diff --git a/testing/btest/Baseline.zam/bifs.to_count/err b/testing/btest/Baseline.zam/bifs.to_count/err new file mode 100644 index 0000000000..c35b90b21b --- /dev/null +++ b/testing/btest/Baseline.zam/bifs.to_count/err @@ -0,0 +1,4 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +error in <...>/to_count.zeek, line 8: bad conversion to count (int_to_count(-2) and -2) +error in <...>/to_count.zeek, line 20: bad conversion to count (to_count() and ) +error in <...>/to_count.zeek, line 25: bad conversion to count (to_count(not a count) and not a count) diff --git a/testing/btest/Baseline.zam/bifs.to_count/out b/testing/btest/Baseline.zam/bifs.to_count/out new file mode 100644 index 0000000000..d727a32bbe --- /dev/null +++ b/testing/btest/Baseline.zam/bifs.to_count/out @@ -0,0 +1,13 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +0 +2 +3 +4 +7 +0 +18446744073709551611 +205 +206 +0 +123 +9223372036854775808 and 9223372036854775808 are the same