33namespace  PHPStan \Type \Generic ;
44
55use  PHPStan \TrinaryLogic ;
6- use  PHPStan \Type \GeneralizePrecision ;
76use  PHPStan \Type \IntersectionType ;
87use  PHPStan \Type \MixedType ;
98use  PHPStan \Type \NeverType ;
@@ -242,12 +241,6 @@ public function inferTemplateTypes(Type $receivedType): TemplateTypeMap
242241		$ map$ this getBound ()->inferTemplateTypes ($ receivedType
243242		$ resolvedBoundresolveLateResolvableTypes (TemplateTypeHelper::resolveTemplateTypes ($ this getBound (), $ map
244243		if  ($ resolvedBoundisSuperTypeOf ($ receivedTypeyes ()) {
245- 			if  ($ this shouldGeneralizeInferredType ()) {
246- 				$ generalizedType$ receivedTypegeneralize (GeneralizePrecision::templateArgument ());
247- 				if  ($ resolvedBoundisSuperTypeOf ($ generalizedTypeyes ()) {
248- 					$ receivedType$ generalizedType
249- 				}
250- 			}
251244			return  (new  TemplateTypeMap ([
252245				$ this name  => $ receivedType
253246			]))->union ($ map
@@ -271,11 +264,6 @@ public function getStrategy(): TemplateTypeStrategy
271264		return  $ this strategy ;
272265	}
273266
274- 	protected  function  shouldGeneralizeInferredType (): bool 
275- 	{
276- 		return  true ;
277- 	}
278- 279267	public  function  traverse (callable  $ cbType 
280268	{
281269		$ bound$ cb$ this getBound ());
0 commit comments