Calling a function within assert property

In reply to ben@SystemVerilog.us:

My apologies Ben , I wasn’t clear with the statement : " The function is essentially called in Observed region."
I meant to say : The function ‘sample()’ is essentially called in Observed region

Does sample() still identify as sequence_match_item ? Since it isn’t attached to sequence_expression

Also in the following case : function f(); sig=1; endfunction
Shouldn’t the function be called in Observed region due to default return-type as 1-bit logic ?

LRM Section 13.2 says :


"A nonvoid function can be used as an operand in an expression; the value of that operand is the value returned by the function."

So my 2nd thought was that sample() doesn’t identify as sequence_match_item ,
it is simply used to return a value which is used as an operand of expression : $isunknown( return_val );

As the property expression is evaluated in Observed region , sample() gets called in Observed region .

Section 16.11 discusses about subroutines as part of sequence_match_item i.e they are always attached to sequence expression .
However in our code there is no sequence expression , so I feel section 16.11 doesn’t apply to our case .
Rather our code could be related to Section 13.2 where the sample() function’s return value is used as an expression.