Commit 288f15d
Carry unsealed slots through
`ArrayCombineHelper` paired only the explicit `getValueTypes()` of the
keys and values arrays, dropping unsealed extras —
`array_combine(array{'a', 'b', ...<int, string>}, array{1, 2, ...<int,
int>})` inferred a sealed `array{a: 1, b: 2}` even though the matching
extras pair up into further entries.
When both inputs are unsealed (their extra counts are both unbounded
and must match for the call to succeed), attach the result's unsealed
slot: the keys' unsealed value (as an array key) mapped to the values'
unsealed value. If only one side is unsealed the sealed side caps the
size, so no extras survive and the result stays sealed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>array_combine() all-constant fast path1 parent e0165b4 commit 288f15d
2 files changed
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
69 | 85 | | |
70 | 86 | | |
71 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
0 commit comments