File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 3737use PHPStan \Type \Traits \NonGeneralizableTypeTrait ;
3838use PHPStan \Type \Traits \NonGenericTypeTrait ;
3939use PHPStan \Type \Traits \UndecidedComparisonCompoundTypeTrait ;
40+ use function get_class ;
4041use function sprintf ;
4142
4243/** @api */
@@ -310,11 +311,7 @@ public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope)
310311
311312 public function equals (Type $ type ): bool
312313 {
313- if (!$ type instanceof self) {
314- return false ;
315- }
316-
317- if ($ type instanceof ErrorType) {
314+ if (get_class ($ type ) !== static ::class) {
318315 return false ;
319316 }
320317
Original file line number Diff line number Diff line change @@ -55,7 +55,12 @@ public function dataCreate(): array
5555 null ,
5656 TemplateTypeVariance::createInvariant (),
5757 ),
58- new MixedType (),
58+ TemplateTypeFactory::create (
59+ TemplateTypeScope::createWithFunction ('a ' ),
60+ 'U ' ,
61+ null ,
62+ TemplateTypeVariance::createInvariant (),
63+ ),
5964 ],
6065 [
6166 new UnionType ([
You can’t perform that action at this time.
0 commit comments