-
-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Currently, defining the same function with the two signatures which are identical except for data annotations does not work (Stan will error during compilation with "Function '[...]' has already been declared for signature [...]`.
This is not usually a big issue, because the data annotations are optional and AFAIK don't provide a substantial benefit - except for allowing you to call other functions which only accept data arguments. Activity analysis (what's data, what's parameter) still happens AFAIK.
However, to work around #3224 , I now sometimes have to add data annotations, and I would like to just do it automatically (via code generation) whenever needed. However, this currently would lead to issues if the same function needs to get called with arguments that have different "activities". The data annotated function would of course not accept the parameter arguments, and defining the same function with more permissive data annotations is currently impossible.