Revert my patch to constants, they broke corlib and System
[mono.git] / mcs / mcs / expression.cs
index eb0285ebeadb6a822014480b61608d519bb3978a..127210c50a796f34081eeb6bf5d115a0b646aecb 100755 (executable)
@@ -1795,7 +1795,6 @@ namespace Mono.CSharp {
                                return null;
                        }
                        expr = Convert.ExplicitConversion (ec, expr, type, loc);
-
                        return expr;
                }
 
@@ -6948,7 +6947,9 @@ namespace Mono.CSharp {
                                                if (!c.LookupConstantValue (out o))
                                                        return null;
 
-                                               return Constantify (o, fi.FieldType);
+                                               object real_value = ((Constant) c.Expr).GetValue ();
+
+                                               return Constantify (real_value, fi.FieldType);
                                        }
                                }