-
-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wrong higher-order function error msg from parser #2578
Comments
yizhang-yiz
changed the title
wrong error msg from parser
wrong higher-order function error msg from parser
Jul 10, 2018
stanc3 currently says
Is that any better? |
Yes, this is better---we should be treating the higher-order functions as functions. In the existing parser, they're hacked special expressions, so require all their own custom warning messages.
I think "returning function" is confusing. I just think we should say "A function was expected" or that "'foobar' is an unknown function". If they supply a function without a return value, then we could say something about expecting a return value.
… On Dec 13, 2018, at 8:48 AM, Matthijs Vákár ***@***.***> wrote:
stanc3 currently says
Semantic error at file "test.stan", line 34, characters 10-80:
-------------------------------------------------
32: theta ~ normal(0, 1);
33: y0 ~ normal(0, 1);
34: y_hat = foobar(sho, y0, t0, ts, theta, x_r,
^
35: x_i);
36: for (t in 1:T)
-------------------------------------------------
A returning function was expected but an undeclared identifier foobar was supplied.
Is that any better?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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-existentfoobar
Current Output:
variable "sho" does not exist.
Expected Output:
Additional Information:
Provide any additional information here.
Current Version:
v2.17.1
The text was updated successfully, but these errors were encountered: