Repository navigation
Commit 26e6270
committed
Cover the sealed key-set shortcut against shapes of unknown sealedness
The shortcut in ConstantArrayType::isSuperTypeOf() only applies when both
shapes are sealed: a shape of unknown sealedness accepts extra keys, so
a required key it lacks decides nothing. isKeyIndexMiss() no longer asks
isConstantScalarValue() first - a non-compound type has a single int or
string constant scalar value only when it is that constant.
Amp-Thread-ID: https://ampcode.com/threads/T-01a1b24f-ec49-7194-bbd2-0f4a43ab9b8f1 parent 0401e57 commit 26e6270
3 files changed
Lines changed: 25 additions & 4 deletions
File tree
- src/Type/Constant
- tests/PHPStan/Type/Constant
- turbo-ext/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3318 | 3318 | | |
3319 | 3319 | | |
3320 | 3320 | | |
3321 | | - | |
| 3321 | + | |
3322 | 3322 | | |
3323 | 3323 | | |
3324 | 3324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
934 | 934 | | |
935 | 935 | | |
936 | 936 | | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
937 | 961 | | |
938 | 962 | | |
939 | 963 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5216 | 5216 | | |
5217 | 5217 | | |
5218 | 5218 | | |
5219 | | - | |
5220 | | - | |
5221 | | - | |
5222 | 5219 | | |
5223 | 5220 | | |
5224 | 5221 | | |
| |||
0 commit comments