-
-
Notifications
You must be signed in to change notification settings - Fork 380
Closed
Description
Summary:
Wrong error message with non-existent higher-order function.
Description:
If a higher-order function does not exist, parser error message points to its functor argument instead of the higher-order function itself.
Reproducible Steps:
The following variant of ODE example from the manual, replacing integrate_ode_bdf
with non-existent foobar
functions {
real[] sho(real t, // time
real[] y, // state
real[] theta, // parameters
real[] x_r, // data (real)
int[] x_i) { // data (integer)
real dydt[2];
dydt[1] = y[2];
dydt[2] = -y[1] - theta[1] * y[2];
return dydt;
}
}
data {
int<lower=1> T;
real y[T*2];
real t0;
real ts[T];
}
transformed data {
real x_r[0];
int x_i[0]; }
parameters {
real y0[2];
vector<lower=0>[2] sigma;
real theta[1];
}
model {
real y_hat[T,2];
sigma ~ cauchy(0, 2.5);
theta ~ normal(0, 1);
y0 ~ normal(0, 1);
y_hat = foobar(sho, y0, t0, ts, theta, x_r,
x_i);
for (t in 1:T)
y[t] ~ normal(y_hat[t][1], sigma);
for (t in 1:T)
y[t+T] ~ normal(y_hat[t][2], sigma);
}
Current Output:
variable "sho" does not exist.
Expected Output:
Function foobar not found.
Additional Information:
Provide any additional information here.
Current Version:
v2.17.1
Metadata
Metadata
Assignees
Labels
No labels