Why is the @data not triggered on a value change?

In reply to dave_59:


Ben,
I dont see the code getting compiled in. which tool are u using?

Dave,
If i change it to non blocking, it is not compiling.

Error-[DTNBA] Dynamic type in non-blocking assignment
testbench.sv, 7
tb, "data"
  Dynamic type (Automatic variable in this case) cannot be used on the 
  left-hand side of non blocking assignments.