Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for item access from
Const
data-structures (#2579)
* Add support for accessing items from data-structures within `Const` * Update type checking logic for `Const dict` Co-authored-by: Thirumalai Shaktivel <[email protected]> * Minor formatting change Co-authored-by: Thirumalai Shaktivel <[email protected]> * Handle negative indices for `const list` and minor formatting changes * Add tests * Update test references * Heavily simplify handling `const` * Tests: Add compile time test * Remove calls to `type_get_past_const()` * Tests: Update test references * Remove extra newline Co-authored-by: Shaikh Ubaid <[email protected]> * Delete tests/reference/asr-test_const_access-82a9a24.json * Delete tests/reference/asr-test_const_access-82a9a24.stdout * Delete tests/reference/asr-test_const_str_access-59ff543.stderr * Delete tests/reference/asr-test_const_tuple_access-0d4c6df.json * Delete tests/reference/asr-test_const_tuple_access-0d4c6df.stderr * Delete tests/reference/asr-test_const_str_access-59ff543.json * Formatting changes * Tests: Add test to CMakeLists and update error references * Update asr_to_llvm.cpp * Undo formatting changes * Undo formatting changes * Revert throwing error for `Const` annotated tuples and strings * Tests: Remove error references * Remove redundant visitor * Undo moving `index` --------- Co-authored-by: Thirumalai Shaktivel <[email protected]> Co-authored-by: Shaikh Ubaid <[email protected]>
- Loading branch information