We’re almost ready to tag. @mitzimorris and I walked through the pull request and it looks good.
But… there’s an issue once we merge with develop. @mitzimorris, can you help me track it down?
If you do this, you’ll find that it fails:
git checkout bugfix/issue-2146-compound-declare-define-matrix
make clean-all
make math-revert
make src/test/test-models/good/declare-define-conditional-op.hpp-test
I get a compiler error when I run the last line:
clang++ -I src -isystem lib/stan_math/lib/eigen_3.2.9 -isystem lib/stan_math/lib/boost_1.62.0 -isystem lib/stan_math/lib/cvodes_2.9.0/include -isystem lib/stan_math/ -Wall -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -DNO_FPRINTF_OUTPUT -pipe -I/usr/local/opt/llvm/include -Wno-unknown-warning-option -Wno-unused-function -Wno-tautological-compare -Wno-c++11-long-long -Wsign-compare -Wno-unused-local-typedef -ftemplate-depth=256 -c -O0 -include src/test/test-models/good/declare-define-conditional-op.hpp -o /dev/null test/test-model-main.cpp
In file included from <built-in>:336:
In file included from <command line>:6:
In file included from ./src/test/test-models/good/declare-define-conditional-op.hpp:3:
In file included from src/stan/model/model_header.hpp:4:
In file included from lib/stan_math/stan/math.hpp:4:
In file included from lib/stan_math/stan/math/rev/mat.hpp:11:
In file included from lib/stan_math/stan/math/prim/mat.hpp:176:
In file included from lib/stan_math/stan/math/prim/mat/fun/promote_scalar.hpp:4:
lib/stan_math/stan/math/prim/scal/fun/promote_scalar.hpp:32:16: error: cannot convert
'stan::math::var' to 'double' without a conversion operator
return T(x);
^~~
lib/stan_math/stan/math/prim/scal/fun/promote_scalar.hpp:68:43: note: in instantiation of member
function 'stan::math::promote_scalar_struct<double, stan::math::var>::apply' requested here
return promote_scalar_struct<T, S>::apply(x);
^
./src/test/test-models/good/declare-define-conditional-op.hpp:193:107: note: in instantiation of
function template specialization 'stan::math::promote_scalar<double, stan::math::var>'
requested here
...? stan::math::promote_scalar<double>(get_base1(y,1,"y",1)) : stan::math::promote_scalar<doubl...
^
test/test-model-main.cpp:9:9: note: in instantiation of function template specialization
'declare_define_conditional_op_model_namespace::declare_define_conditional_op_model::log_prob<false,
false, stan::math::var>' requested here
model.log_prob<false, false>(params, x_i);
^
1 error generated.
make: *** [src/test/test-models/good/declare-define-conditional-op.hpp-test] Error 1