Closed
Description
Summary:
Currently, various keywords can be used as variable names in Stan. This seems like a bad idea from a PL perspective.
Description:
For instance, lower
and upper
can be used as variable names.
Reproducible Steps:
The following is a valid Stan program, currently:
transformed parameters {
real lower;
real<lower=lower> upper;
real<lower=upper, upper=lower> imconfusednow;
print(imconfusednow);
}
Current Output:
No error.
Expected Output:
Syntax error on line 2.
Additional Information:
This is currently exploited in rstanarm.
Current Version:
v2.18.0