You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, includes of more than 1 level deep are ignored. This seems impractical.
Description:
Currently, you can include one Stan file a.stan from another b.stan. But we cannot have a.stan includes b.stan includes c.stan. The include of c.stan in b.stan will then be silently ignored by the current parser. At the very least, an error should be thrown if that is the desired behaviour.
Reproducible Steps:
Write file a.stan with content
model {
#include b.stan
}
b.stan with content
int y;
#include c.stan
c.stanwith content
int y;
```.
#### Current Output:
This parses fine.
#### Expected Output:
I would expect an error saying that the variable y is declared twice.
#### Additional Information:
Provide any additional information here.
#### Current Version:
v2.18.0
The text was updated successfully, but these errors were encountered:
Stanc3 fixes this by allowing arbitrary hierarchies of includes. It throws an informative error if a cyclical include structure is detected (e.g. a.stan includes b.stan includes a.stan again).
Summary:
Currently, includes of more than 1 level deep are ignored. This seems impractical.
Description:
Currently, you can include one Stan file a.stan from another b.stan. But we cannot have a.stan includes b.stan includes c.stan. The include of c.stan in b.stan will then be silently ignored by the current parser. At the very least, an error should be thrown if that is the desired behaviour.
Reproducible Steps:
Write file
a.stan
with contentb.stan
with contentc.stan
with contentThe text was updated successfully, but these errors were encountered: