Commit e51ec3e
Allow stored expression types for new-chain expressions when set on the same AST node
When an expression has `new` in its receiver chain, only skip the stored
type lookup if the stored type came from a different AST node (e.g. assert
narrowing). If the stored type was set for the same AST node (e.g. inline
@var annotation), allow it through. This fixes @var overrides on
expressions like `return (new Defaults())->getFunctions()`.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 17f3a00 commit e51ec3e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
973 | 973 | | |
974 | 974 | | |
975 | 975 | | |
976 | | - | |
977 | 976 | | |
| 977 | + | |
978 | 978 | | |
979 | 979 | | |
980 | 980 | | |
| |||
0 commit comments