Exemplo n.º 1
0
 private static void InsertInOperatorListIfLessGenericThanExisting(Symbols.Method OperatorToInsert, List <Symbols.Method> OperatorList, ref bool GenericMembersExistInList)
 {
     if (Symbols.IsGeneric(OperatorToInsert.DeclaringType))
     {
         GenericMembersExistInList = true;
     }
     if (GenericMembersExistInList)
     {
         for (int i = OperatorList.Count - 1; i >= 0; i += -1)
         {
             Symbols.Method left    = OperatorList[i];
             Symbols.Method method2 = OverloadResolution.LeastGenericProcedure(left, OperatorToInsert);
             if (method2 == left)
             {
                 return;
             }
             if (method2 != null)
             {
                 OperatorList.Remove(left);
             }
         }
     }
     OperatorList.Add(OperatorToInsert);
 }