Write a constraint for polindrome (say 32 bit)?

Hi @dave_59 I am also getting same error as @VarunVlsi mentioned.
CODE :
class A;
rand bit[31:0] dummy; //Logic in post randomize
rand bit[31:0] dummy1; // Logic in constraint
rand bit[31:0] dummy2; // Logic in constraint

function void post_randomize();

for(int i =0;i<16;i++)
begin
dummy[31-i] = dummy[i];
end
endfunction

constraint range {
foreach(dummy1[j])
dummy1[j] == dummy1[31-j];}

constraint palindrome { dummy2 == {<<{dummy2}}; }
endclass

module AA;
A a;
initial begin
a = new();
a.randomize();
$display(" dummy = %b", a.dummy);
$display(" dummy = %b", a.dummy1);
end

endmodule

Simulation output result:

Error-[IUSO] Incorrect use of streaming operators
testbench.sv, 21
$unit, “{ << 1 {this.dummy2}}”
Streaming operators cannot be used in this context

Error-[ETRFS] Explicit typecast required for streams
testbench.sv, 21
$unit, “(this.dummy2 == { << 1 {this.dummy2}})”
Stream operands require explicit typecast to be used with other operators

And one more thing that @surya_narayana_Guptha said he want palindrome in the form of decimal.
Eg : 59395.

Please suggest us or help us.

Thanks in Adavance.