stan-dev / stan

Stan development repository. The master branch contains the current release. The develop branch contains the latest stable development. See the Developer Process Wiki for details.
https://mc-stan.org
BSD 3-Clause "New" or "Revised" License
2.59k stars 368 forks source link

Adds size checking to uni index array assignment #3218

Closed SteveBronder closed 1 year ago

SteveBronder commented 1 year ago

Submission Checklist

Summary

Fixes #3150 to do a size check when assigning to the inner elements of an array whose inner elements also have dimensions.

Intended Effect

Stop the use of accidental ragged arrays

How to Verify

New test added that can be run with

python ./runTests.py -j18 ./src/test/unit/model/indexing/assign_test.cpp

Side Effects

Documentation

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Simons Foundation

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: