Mathematica v13.0:
nr:=HoldForm@Evaluate@Function[t,x@t][]
then evaluate
In[29]:= nr
During evaluation of In[29]:= Function::fpct: Too many parameters in {t} to be filled from Function[t,x[t]][].
Out[29]= Function[t,x[t]][]
Strangely, reevaluation does not reproduce the error message:
In[30]:= nr
Out[30]= Function[t,x[t]][]
although reevaluating Function[t,x[t]][]
reproduces the error message, hence SetDelayed
is responsible for the non reproduction of the error message and more precisely it must be caching something.
Same problem with nr:=HoldForm@Evaluate@Transpose@{{1},{1,2}}
.
However, no problem with nr:=HoldForm@Evaluate[1/0]
and nr:=HoldForm@Evaluate[n:=n+1;n]
.
What is going on? How to always obtain an error message at each evaluation?
nr := ToExpression["Function[t,x@t][]"]
$\endgroup$