if (expr_type.Equals (target_type))
return true;
+
// First numeric conversions
if (expr_type == TypeManager.sbyte_type){
return true;
}
+ if (expr.eclass == ExprClass.MethodGroup){
+ if (TypeManager.IsDelegateType (target_type) && RootContext.Version != LanguageVersion.ISO_1){
+ MethodGroupExpr mg = expr as MethodGroupExpr;
+ if (mg != null){
+ //
+ // This should not happen frequently, so we can create an object
+ // to test compatibility
+ //
+ Expression c = ImplicitDelegateCreation.Create (ec, mg, target_type, Location.Null);
+ return c != null;
+ }
+ }
+ }
+
if (ImplicitReferenceConversionExists (ec, expr, target_type))
return true;
if (conv != null)
return true;
}
-
+
return false;
}