Commit 9f0da34
Revert get_class() simplification in ObjectType::equals() to fix TemplateObjectType regression
The `get_class($type) !== static::class` check was too strict - it rejected
TemplateObjectType instances that should be comparable by class name, since
TemplateObjectType extends ObjectType but has no equals() override. This caused
false `varTag.type` errors when using @var with generic template types.
Reverts to explicit instanceof checks: reject EnumCaseObjectType and
GenericObjectType (when $this is plain ObjectType), but allow other ObjectType
subclasses like TemplateObjectType.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 72ec631 commit 9f0da34
2 files changed
+17
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1474 | 1474 | | |
1475 | 1475 | | |
1476 | 1476 | | |
1477 | | - | |
| 1477 | + | |
1478 | 1478 | | |
1479 | 1479 | | |
1480 | 1480 | | |
1481 | 1481 | | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
1482 | 1488 | | |
1483 | 1489 | | |
1484 | 1490 | | |
1485 | | - | |
| 1491 | + | |
1486 | 1492 | | |
1487 | 1493 | | |
1488 | 1494 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
| |||
625 | 624 | | |
626 | 625 | | |
627 | 626 | | |
628 | | - | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
629 | 636 | | |
630 | 637 | | |
631 | 638 | | |
| |||
0 commit comments