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
While reviewing #1044@nhuurre discovered that these two functions are treated differently:
realfoo_log(array[,] real x) {
returnsum(x[1]);
}
real foo_lpdf(array[,] real x) {
returnsum(x[1]);
}
Because UnsizedType.is_real_type doesn't check nested arrays, only 1-D ones.
I've asked @bob-carpenter and it seems the original intent was for any nested type to be possible, so the latter is the bug. Changing UnsizedType.is_real_type and UnsizedType.is_int_type should be the right thing to do here.
Additionally, there is nothing preventing a user from defining real foo_log(complex z) at the moment, which isn't possible for _lp[dm]f.
The text was updated successfully, but these errors were encountered:
While reviewing #1044 @nhuurre discovered that these two functions are treated differently:
Because
UnsizedType.is_real_type
doesn't check nested arrays, only 1-D ones.I've asked @bob-carpenter and it seems the original intent was for any nested type to be possible, so the latter is the bug. Changing
UnsizedType.is_real_type
andUnsizedType.is_int_type
should be the right thing to do here.Additionally, there is nothing preventing a user from defining
real foo_log(complex z)
at the moment, which isn't possible for_lp[dm]f
.The text was updated successfully, but these errors were encountered: