File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 37
37
use PHPStan \Type \Traits \NonGeneralizableTypeTrait ;
38
38
use PHPStan \Type \Traits \NonGenericTypeTrait ;
39
39
use PHPStan \Type \Traits \UndecidedComparisonCompoundTypeTrait ;
40
+ use function get_class ;
40
41
use function sprintf ;
41
42
42
43
/** @api */
@@ -310,11 +311,7 @@ public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope)
310
311
311
312
public function equals (Type $ type ): bool
312
313
{
313
- if (!$ type instanceof self) {
314
- return false ;
315
- }
316
-
317
- if ($ type instanceof ErrorType) {
314
+ if (get_class ($ type ) !== static ::class) {
318
315
return false ;
319
316
}
320
317
Original file line number Diff line number Diff line change @@ -54,7 +54,12 @@ public function dataCreate(): array
54
54
null ,
55
55
TemplateTypeVariance::createInvariant (),
56
56
),
57
- new MixedType (),
57
+ TemplateTypeFactory::create (
58
+ TemplateTypeScope::createWithFunction ('a ' ),
59
+ 'U ' ,
60
+ null ,
61
+ TemplateTypeVariance::createInvariant (),
62
+ ),
58
63
],
59
64
[
60
65
new UnionType ([
You can’t perform that action at this time.
0 commit comments