mirror of
https://codeberg.org/ziglang/zig
synced 2026-11-18 07:05:05 +00:00
Basically removes a bunch of special casing for slices from the main `analyzeLoad` code path and moves it to the new `preparePtrForDeref` function which supplants the `verifyDeref` function. The `preparePtrForDeref` function turns slices with comptime-known lengths into single-item pointers to arrays and is called directly in the functions where that kind of conversion could happen. All subsequent code now doesn't have to deal with the possibility that a derefable pointer could be a slice anymore. This fixes a bug where dereferencing a slice of an OPV type would result in a single instance of that OPV type as if the slice had been a single-item pointer to that type.
1122 lines
34 KiB
1122 lines
34 KiB