[mcs] Revert unwanted change from 9e5d5e5c90fce0374447b81111b5d6b08773c55a
authorMarek Safar <marek.safar@gmail.com>
Wed, 4 Jun 2014 17:06:59 +0000 (19:06 +0200)
committerMarek Safar <marek.safar@gmail.com>
Wed, 4 Jun 2014 17:06:59 +0000 (19:06 +0200)
mcs/mcs/ecore.cs

index 586afa5ec49571ddc1d78bb735a268233999925f..788b9e1dee5a0746f107597d6cca6192cb560e1f 100644 (file)
@@ -415,8 +415,8 @@ namespace Mono.CSharp {
 
                        // In a member access of the form E.I, if E is a single identifier, and if the meaning of E as a simple-name is
                        // a constant, field, property, local variable, or parameter with the same type as the meaning of E as a type-name
-                       // LAMESPEC: By constant 
-                       if (IsSimpleNameExpression (left)) {
+
+                       if (left is MemberExpr || left is VariableReference) {
                                var identical_type = rc.LookupNamespaceOrType (name.Name, 0, LookupMode.Probing, loc) as TypeExpr;
                                if (identical_type != null && identical_type.Type == left.Type)
                                        return identical_type;
@@ -425,16 +425,6 @@ namespace Mono.CSharp {
                        return left;
                }
 
-               static bool IsSimpleNameExpression (Expression left)
-               {
-                       if (left is MemberExpr || left is VariableReference)
-                               return true;
-
-                       var c = left as Constant;
-                       return c != null && !c.IsLiteral;
-               }
-
-
                public virtual string GetSignatureForError ()
                {
                        return type.GetDefinition ().GetSignatureForError ();