-
-
Notifications
You must be signed in to change notification settings - Fork 373
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
Misleading error message when function multiply defined #2526
Comments
From @bgoodri on May 25, 2018 18:1 I agree this is misleading, but I am sure it applies to all interfaces so On Fri, May 25, 2018 at 12:47 PM, Kevin S. Van Horn <
|
stanc3 currently says
stanc2 still says
|
This is great. I don't like the extra spaces around Here, I'd prefer to see something like " 'rot_matrix' is already defined". |
In C++, this program
produces
I like that it says "redefinition" instead of "already in use". |
Just fixed this. |
This was fixed in stanc3. |
From @ksvanhorn on May 25, 2018 16:47
Summary:
When a function is defined twice, the error message points to the function AFTER the second definition.
Description:
A program defines the function "rot_matrix" twice in the "functions" block. The error message points at the beginning of the definition of a later function, "scale_matrix".
Reproducible Steps:
Run stanc on the following program:
Current Output:
Expected Output:
The caret should point at the beginning of the second definition of
rot_matrix
.RStan Version:
2.17.3
R Version:
R version 3.4.3 (2017-11-30)
Operating System:
OS X 10.13.4
Copied from original issue: stan-dev/rstan#533
The text was updated successfully, but these errors were encountered: