stan-dev / stanc3

The Stan transpiler (from Stan to C++ and beyond).
BSD 3-Clause "New" or "Revised" License
138 stars 44 forks source link

Treat int returns from functions as DataOnly #1265

Closed WardBrian closed 1 year ago

WardBrian commented 1 year ago

Fixes #803. This marks any function call which results in an integer as data rather than autodiffable. This will include things like size, cols, etc.

Submission Checklist

Release notes

Functions which return integer types are considered as "data" for purposes of data-only arguments.

Copyright and Licensing

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)