mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-16 08:18:10 +00:00
When checking `a[i]` for a non-array type, first try `IndirectIndexWith.Ref`, falling back to `IndexWith.At`, per the indexing design. This allows subscripting to produce a reference expression, so that `a[i] = v` works and non-copyable elements can be accessed. Extracted from #7536 (the `Core.Slice` proposal).