Author: raja
Date: 2005-04-13 10:39:07 -0400 (Wed, 13 Apr 2005)
New Revision: 42921

Added:
   trunk/mcs/tests/test-363.cs
Modified:
   trunk/mcs/mcs/ChangeLog
   trunk/mcs/mcs/ecore.cs
   trunk/mcs/tests/ChangeLog
   trunk/mcs/tests/Makefile
Log:
Fix #74528.
* mcs/ecore.cs (PropertyExpr.InstanceResolve): Handle a case of
IdenticalNameAndTypeName here.
(EventExpr.InstanceResolve): Likewise.
* tests/test-363.cs: New test from #74528.


Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog     2005-04-13 14:00:30 UTC (rev 42920)
+++ trunk/mcs/mcs/ChangeLog     2005-04-13 14:39:07 UTC (rev 42921)
@@ -1,3 +1,10 @@
+2005-04-13  Raja R Harinath  <[EMAIL PROTECTED]>
+
+       Fix #74528.
+       * ecore.cs (PropertyExpr.InstanceResolve): Handle a case of
+       IdenticalNameAndTypeName here.
+       (EventExpr.InstanceResolve): Likewise.
+
 2005-04-13  Marek Safar  <[EMAIL PROTECTED]>
 
        C# 2.0 DefaultCharSetAttribute implementation

Modified: trunk/mcs/mcs/ecore.cs
===================================================================
--- trunk/mcs/mcs/ecore.cs      2005-04-13 14:00:30 UTC (rev 42920)
+++ trunk/mcs/mcs/ecore.cs      2005-04-13 14:39:07 UTC (rev 42921)
@@ -3260,6 +3260,9 @@
                                return false;
                        }
 
+                       if (!IsInstance || InstanceExpression == 
EmptyExpression.Null)
+                               InstanceExpression = null;
+
                        if (InstanceExpression != null) {
                                InstanceExpression = 
InstanceExpression.DoResolve (ec);
                                if (InstanceExpression == null)
@@ -3593,6 +3596,9 @@
                                return false;
                        }
 
+                       if (!IsInstance || InstanceExpression == 
EmptyExpression.Null)
+                               InstanceExpression = null;
+
                        if (InstanceExpression != null) {
                                InstanceExpression = 
InstanceExpression.DoResolve (ec);
                                if (InstanceExpression == null)
@@ -3623,6 +3629,9 @@
 
                public override Expression DoResolve (EmitContext ec)
                {
+                       if (!IsInstance)
+                               InstanceExpression = null;
+
                        if (InstanceExpression != null) {
                                InstanceExpression = 
InstanceExpression.DoResolve (ec);
                                if (InstanceExpression == null)

Modified: trunk/mcs/tests/ChangeLog
===================================================================
--- trunk/mcs/tests/ChangeLog   2005-04-13 14:00:30 UTC (rev 42920)
+++ trunk/mcs/tests/ChangeLog   2005-04-13 14:39:07 UTC (rev 42921)
@@ -1,3 +1,7 @@
+2005-04-13  Raja R Harinath  <[EMAIL PROTECTED]>
+
+       * test-363.cs: New test from #74528.
+
 2005-04-11  Marek Safar <[EMAIL PROTECTED]>
 
        * test-362.cs: #74565 test case.

Modified: trunk/mcs/tests/Makefile
===================================================================
--- trunk/mcs/tests/Makefile    2005-04-13 14:00:30 UTC (rev 42920)
+++ trunk/mcs/tests/Makefile    2005-04-13 14:39:07 UTC (rev 42921)
@@ -31,7 +31,7 @@
 NEW_TEST_SOURCES_common = xml-033 xml-034 xml-035 xml-036 test-329 2test-16 
test-330 a-parameter5 test-331 test-332 \
                          test-333 test-311 test-335 test-336 test-337 test-287 
test-338 test-339 test-341 test-334 test-342 \
                          test-344 test-345 test-346 test-347 test-348 test-349 
test-350 test-351 test-352 test-353 test-354 test-355 \
-                         test-356 test-357 test-358 test-359 test-360 test-361 
test-362 \
+                         test-356 test-357 test-358 test-359 test-360 test-361 
test-362 test-363 \
        mtest-7-dll mtest-7-exe \
        mtest-8-dll mtest-8-exe
 

Added: trunk/mcs/tests/test-363.cs
===================================================================
--- trunk/mcs/tests/test-363.cs 2005-04-13 14:00:30 UTC (rev 42920)
+++ trunk/mcs/tests/test-363.cs 2005-04-13 14:39:07 UTC (rev 42921)
@@ -0,0 +1,20 @@
+public class Location {
+       public static readonly Location UnknownLocation = new 
+Location();
+
+       private Location() {
+       }
+}
+
+public abstract class Element {
+       private Location _location = Location.UnknownLocation;
+
+       protected virtual Location Location {
+               get { return _location; }
+               set { _location = value; }
+       }
+}
+
+public class T {
+       public static void Main () { }
+}

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to