In reply to jh_veryveri:
“a==b” is not sampled in the preponed region, only the variables a and b (the operands) are sampled. The expression “$sampled(a) == $sampled(b)” is what gets evaluated in the observed region.
If you have
assert property (@clk p_expression) else $error(a_expression)
All of the operands inside p_expression implicitly use their sampled values. But in the action block a_expression uses their current values in the reactive region. You must explicitly use $sampled(a) to get the preponed value of a in the expression.