diff --git a/src/stan/model/model_base.hpp b/src/stan/model/model_base.hpp index 1f6de972f9..eab24bec11 100644 --- a/src/stan/model/model_base.hpp +++ b/src/stan/model/model_base.hpp @@ -1,11 +1,11 @@ #ifndef STAN_MODEL_MODEL_BASE_HPP #define STAN_MODEL_MODEL_BASE_HPP -#include -#include #ifdef STAN_MODEL_FVAR_VAR #include #endif +#include +#include #include #include #include diff --git a/src/stan/model/model_base_crtp.hpp b/src/stan/model/model_base_crtp.hpp index 1868b3e056..cfb54a91ad 100644 --- a/src/stan/model/model_base_crtp.hpp +++ b/src/stan/model/model_base_crtp.hpp @@ -1,10 +1,10 @@ #ifndef STAN_MODEL_MODEL_BASE_CRTP_HPP #define STAN_MODEL_MODEL_BASE_CRTP_HPP -#include #ifdef STAN_MODEL_FVAR_VAR #include #endif +#include #include #include #include diff --git a/src/stan/model/model_header.hpp b/src/stan/model/model_header.hpp index 34948377f7..a3896ecc6c 100644 --- a/src/stan/model/model_header.hpp +++ b/src/stan/model/model_header.hpp @@ -1,14 +1,14 @@ #ifndef STAN_MODEL_MODEL_HEADER_HPP #define STAN_MODEL_MODEL_HEADER_HPP +#include +#include #include #include #include #include -#include -#include #include #include #include diff --git a/src/test/test-models/good/model/accumulate.stan b/src/test/test-models/good/model/accumulate.stan new file mode 100644 index 0000000000..4246875145 --- /dev/null +++ b/src/test/test-models/good/model/accumulate.stan @@ -0,0 +1,9 @@ +data { + int N; +} +parameters { + vector[N] y; +} +model { + target += y; +} diff --git a/src/test/unit/model/compile_test.cpp b/src/test/unit/model/compile_test.cpp new file mode 100644 index 0000000000..abd9f383df --- /dev/null +++ b/src/test/unit/model/compile_test.cpp @@ -0,0 +1,2 @@ +// test model which previously failed with -DSTAN_MODEL_FVAR_VAR +#include