Commit 3699e95
Bail
`findConstantStrings` walked a constant array's explicit
`getValueTypes()` to collect the variable names, so an unsealed names
array — `compact(array{'foo', 'bar', ...<int, string>})` — produced a
sealed `array{foo: ..., bar: ...}`, ignoring that the unsealed extras
are further unknown variable names.
Return `null` (give up the precise shape) when the names array is
`isUnsealed()->yes()`, so the caller falls back to the general
`array<string, mixed>` signature.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>compact() enumeration for unsealed name arrays1 parent 6988c81 commit 3699e95
2 files changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
78 | 85 | | |
79 | 86 | | |
80 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments