[mcs] Initial by ref returns and variables support
[mono.git] / mcs / mcs / convert.cs
index 8fe0e2026ca5842fdc286d456bf41a536f79456b..b11477c104394b7bc77075d6e4fa02827797529e 100644 (file)
@@ -1503,6 +1503,11 @@ namespace Mono.CSharp {
                                        return null;
                        }
 
+                       if (expr is ReferenceExpression) {
+                               // Only identify conversion is allowed
+                               return null;
+                       }
+
                        e = ImplicitNumericConversion (expr, expr_type, target_type);
                        if (e != null)
                                return e;