@@ -84,29 +84,36 @@ public static bool CheckIgnoreProperty(Property prop)
8484 return ! prop . IsGenerated ;
8585 }
8686
87- public static void CheckTypeForSpecialization ( Type type , Declaration container ,
87+ public static bool CheckTypeForSpecialization ( Type type , Declaration container ,
8888 Action < ClassTemplateSpecialization > addSpecialization ,
8989 ITypeMapDatabase typeMaps , bool internalOnly = false )
9090 {
9191 type = type . Desugar ( ) ;
9292 type = ( type . GetFinalPointee ( ) ?? type ) . Desugar ( ) ;
9393 ClassTemplateSpecialization specialization = GetParentSpecialization ( type ) ;
9494 if ( specialization == null )
95- return ;
95+ return true ;
9696
9797 if ( IsSpecializationNeeded ( container , typeMaps , internalOnly , specialization ) )
98- return ;
98+ return false ;
9999
100100 if ( ! internalOnly )
101101 {
102102 if ( IsSpecializationSelfContained ( specialization , container ) )
103- return ;
103+ return true ;
104104
105105 if ( IsMappedToPrimitive ( typeMaps , type , specialization ) )
106- return ;
106+ return true ;
107107 }
108108
109+ if ( specialization . Arguments . Select (
110+ a => a . Type . Type ) . Any ( t => t != null &&
111+ ! CheckTypeForSpecialization ( t , container , addSpecialization ,
112+ typeMaps , internalOnly ) ) )
113+ return false ;
114+
109115 addSpecialization ( specialization ) ;
116+ return true ;
110117 }
111118
112119 public static bool IsTypeExternal ( Module module , Type type )
0 commit comments