Repository navigation
Commit 8d3f5de
committed
Do not resolve a late-static-bound get_parent_class() argument inside a trait
The in-trait guard already bails out for $this. Apply it to static::class as well, so
a trait does not resolve a late-static-bound argument against one particular using
class. Outside a trait static::class keeps the narrowed type.1 parent 3b0a343 commit 8d3f5de
2 files changed
Lines changed: 8 additions & 4 deletions
File tree
- src/Type/Php
- tests/PHPStan/Analyser/nsrt
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
79 | 85 | | |
80 | 86 | | |
81 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
| 51 | + | |
54 | 52 | | |
55 | 53 | | |
56 | 54 | | |
0 commit comments