Throw invalid_argument error in case of dynamic indexing of channels array#3896
Throw invalid_argument error in case of dynamic indexing of channels array#3896magancarz wants to merge 3 commits intogoogle:mainfrom
invalid_argument error in case of dynamic indexing of channels array#3896Conversation
75ade97 to
77494a4
Compare
|
|
77494a4 to
4d2bd2c
Compare
|
I've rebased changes on latest main, so Continuous Integration job will now succeed. |
4d2bd2c to
0690ace
Compare
|
Thanks for the review! I've applied your suggestion. |
0690ace to
c490ab7
Compare
|
I've added more descriptive error log. See review comment. |
|
Merging #3931 should help with the failing |
|
This is failing internal tests; the DSLX index is correctly a const (it's the index in an unroll for) but the new check is claiming it's not a const. |
@dplassgit the check is based on confirming that the index value is a known const, so I suspect that constant collector couldn't collect the value before the check (it was a similar case with |
|
It looks something like this (partially redacted) |
|
Hey @dplassgit , |
|
@dplassgit you can find our attempt to reproduce your failing test case in this commit in our fork. |
c490ab7 to
883bc8c
Compare
|
I've rebased changes onto the latest main, so |
|
Re-approving to run internal checks. |
This PR adds throwing an error in case of dynamic indexing of channels array. It is handled by checking constness of value used for indexing an array of channels in
semantics_analysis.cc.test_constexpr_rollover_warningtest inerror_modules_test.py.