We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given its central role in the language, target should be a reserved keyword and should not be free to use as a variable.
target
target should only be usable to access (increment or read off) the log-density. We should not be overloading this critical key word.
Currently, the following is a valid Stan program
functions { vector target(vector y, vector theta, real[] x_r, int[] x_i) { vector[2] deltas; deltas[1] = y[1] - theta[1] - x_r[1]; return deltas; } }
It shouldn't be.
Parser does not complain.
Parser complains about illegal use of target.
(I would expect the same of get_lp, but I guess that's been deprecated.)
get_lp
v2.18.0
The text was updated successfully, but these errors were encountered:
Fixed in stanc3.
Sorry, something went wrong.
No branches or pull requests
Summary:
Given its central role in the language,
target
should be a reserved keyword and should not be free to use as a variable.Description:
target
should only be usable to access (increment or read off) the log-density. We should not be overloading this critical key word.Reproducible Steps:
Currently, the following is a valid Stan program
It shouldn't be.
Current Output:
Parser does not complain.
Expected Output:
Parser complains about illegal use of
target
.Additional Information:
(I would expect the same of
get_lp
, but I guess that's been deprecated.)Current Version:
v2.18.0
The text was updated successfully, but these errors were encountered: