Skip to content
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
data {
}
model {
target += von_mises_ccdf_log(1, 0,1);
}
3 changes: 3 additions & 0 deletions test/integration/bad/missing_dist_suffix/no_rng_suffix.stan
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
generated quantities {
real x = multi_gp_cholesky_rng([[0,0],[0,0]], [1,0]);
}
58 changes: 56 additions & 2 deletions test/integration/bad/missing_dist_suffix/stanc.expected
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
$ ../../../../../install/default/bin/stanc deprecated_suffix.stan
Semantic error in 'deprecated_suffix.stan', line 4, column 14 to column 40:
-------------------------------------------------
2: }
3: model {
4: target += von_mises_ccdf_log(1, 0,1);
^
5: }
-------------------------------------------------

A returning function was expected but an undeclared identifier 'von_mises_ccdf_log' was supplied.
$ ../../../../../install/default/bin/stanc lpmf_lpdf_replacement1.stan
Semantic error in 'lpmf_lpdf_replacement1.stan', line 5, column 14 to column 34:
-------------------------------------------------
Expand All @@ -20,6 +31,16 @@ Semantic error in 'lpmf_lpdf_replacement2.stan', line 5, column 14 to column 32:
-------------------------------------------------

Function 'normal_lpmf' is not implemented for distribution 'normal', use 'normal_lpdf' instead.
$ ../../../../../install/default/bin/stanc no_rng_suffix.stan
Semantic error in 'no_rng_suffix.stan', line 2, column 12 to column 55:
-------------------------------------------------
1: generated quantities {
2: real x = multi_gp_cholesky_rng([[0,0],[0,0]], [1,0]);
^
3: }
-------------------------------------------------

Function 'multi_gp_cholesky_rng' is not implemented for distribution 'multi_gp_cholesky'.
$ ../../../../../install/default/bin/stanc non_existing_distribution_suffix1.stan
Semantic error in 'non_existing_distribution_suffix1.stan', line 4, column 14 to column 34:
-------------------------------------------------
Expand Down Expand Up @@ -58,9 +79,42 @@ Semantic error in 'non_existing_distribution_suffix4.stan', line 4, column 14 to
-------------------------------------------------
2: }
3: model {
4: target += von_mises_notasuffix(1|0,1);
4: target += von_mises_notasuffix(1,0,1);
^
5: }
-------------------------------------------------

A returning function was expected but an undeclared identifier 'von_mises_notasuffix' was supplied.
$ ../../../../../install/default/bin/stanc user_defined.stan
Semantic error in 'user_defined.stan', line 7, column 13 to column 27:
-------------------------------------------------
5: }
6: model {
7: target += bar_lpmf(19.2);
^
8: }
-------------------------------------------------

Function 'bar_lpmf' is not implemented for distribution 'bar', use 'bar_lpdf' instead.
$ ../../../../../install/default/bin/stanc user_defined_no_cdf.stan
Semantic error in 'user_defined_no_cdf.stan', line 7, column 14 to column 29:
-------------------------------------------------
5: }
6: model {
7: target += bar_lcdf(1|0,1);
^
8: }
-------------------------------------------------

A returning function was expected but an undeclared identifier 'bar_lcdf' was supplied.
$ ../../../../../install/default/bin/stanc user_defined_no_rng.stan
Semantic error in 'user_defined_no_rng.stan', line 7, column 12 to column 23:
-------------------------------------------------
5: }
6: generated quantities {
7: real x = bar_rng(10);
^
8: }
-------------------------------------------------

Only functions with names ending in _lpdf, _lupdf, _lpmf, _lupmf, _cdf, _lcdf, _lccdf can make use of conditional notation.
A returning function was expected but an undeclared identifier 'bar_rng' was supplied.
8 changes: 8 additions & 0 deletions test/integration/bad/missing_dist_suffix/user_defined.stan
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
functions {
real bar_lpdf(real x){
return 1.0;
}
}
model {
target += bar_lpmf(19.2);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
functions {
real bar_lpdf(real x){
return 1.0;
}
}
model {
target += bar_lcdf(1|0,1);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
functions {
real bar_lpdf(real x){
return 1.0;
}
}
generated quantities {
real x = bar_rng(10);
}
9 changes: 9 additions & 0 deletions test/integration/tfp/stan_models/test_mat_corr.stan
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
data {
int K;
}
parameters {
cholesky_factor_corr[K] L;
}
model {
target += lkj_corr_cholesky_lpdf(L|2.5);
}