Commit 07076d6
Account for non-final classes: child can override property visibility
For non-final classes, a child class can widen visibility:
- protected: type is preserved (invariant in PHP), treat as maybe
- private: child can redeclare with any type, treat as mixed
For final classes, non-accessible properties return empty array.
Add implicit final test for new expression (asFinal via NewHandler).1 parent 465af39 commit 07076d6
1 file changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
304 | 317 | | |
305 | 318 | | |
306 | 319 | | |
| |||
0 commit comments