Bins using with clause not working in covergroup with function sample

I defined a covergroup to collect a 32 bit my_value. It’s defined in an independent file outside of any classes so I used with function sample.

covergroup my_cg with function sample(logic [31:0] my_value);
    coverpoint my_value{
        bins my_bin0 = my_value with (item & 32'h00FF == 32'h00AC);
        bins my_bin1 = my_value with (item & 32'h00FF == 32'h00BD);
        bins default_bin[ ] = default;
    }
endgroup

It seems that the item in with condition statement cannot get my_value which is from the function sample. All my_values drop into the default bin. Does anybody know how to solve this problem?

Equality has higher precedence than bitwise-and. You need parenthesis

(item & 32'h00FF) == 32'h00AC

A simpler way to write this would be

    coverpoint my_value[7:0] {
        bins my_bin0 = {8'hAC};
        bins my_bin1 = {8'BD};
        bins default_bin[ ] = default;
    }

Thanks for the reply.
The code I post is a small demo to illustrate how i defined my covergroup. I researched some documents and found out that the conflict between with or iff clause in covergroup and the function sample does exist. The sampled my_value cannot be used in condition statements. So for complicated bins defs, using with function sample might not be a wise choice.
Your reply inspired me that in my case I can use wildcard bins:

    wildcard bins my_bin0 = {32'b????????????????10101100};

Thanks!