-
-
Notifications
You must be signed in to change notification settings - Fork 48
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomerstypechecker
Description
While reviewing #1044 @nhuurre discovered that these two functions are treated differently:
real foo_log(array[,] real x) {
return sum(x[1]);
}
real foo_lpdf(array[,] real x) {
return sum(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.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomerstypechecker