Author: martin
Date: 2005-04-12 08:07:40 -0400 (Tue, 12 Apr 2005)
New Revision: 42825

Modified:
   trunk/mcs/gmcs/ChangeLog
   trunk/mcs/gmcs/anonymous.cs
Log:
**** Merged r40516 from MCS ****


Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog    2005-04-12 12:06:44 UTC (rev 42824)
+++ trunk/mcs/gmcs/ChangeLog    2005-04-12 12:07:40 UTC (rev 42825)
@@ -1,5 +1,9 @@
 2005-02-11  Miguel de Icaza  <[EMAIL PROTECTED]>
 
+       * anonymous.cs (AnonymousMethod.Compatible): Pass the
+       Modifiers.STATIC to the Anonymous' Method EmitContext if static is
+       set on the current EmitContext. 
+
        * expression.cs (Cast): Overload DoResolveLValue so we can pass
        resolve our casted expression as an LValue.  This triggers the
        proper LValue processing that is later required by Assign.

Modified: trunk/mcs/gmcs/anonymous.cs
===================================================================
--- trunk/mcs/gmcs/anonymous.cs 2005-04-12 12:06:44 UTC (rev 42824)
+++ trunk/mcs/gmcs/anonymous.cs 2005-04-12 12:07:40 UTC (rev 42825)
@@ -276,13 +276,14 @@
                                ec.TypeContainer, ec.DeclSpace, loc, null,
                                invoke_mb.ReturnType,
                                /* REVIEW */ (ec.InIterator ? 
Modifiers.METHOD_YIELDS : 0) |
-                               (ec.InUnsafe ? Modifiers.UNSAFE : 0),
+                               (ec.InUnsafe ? Modifiers.UNSAFE : 0) |
+                               (ec.IsStatic ? Modifiers.STATIC : 0),
                                /* No constructor */ false);
 
                        aec.CurrentAnonymousMethod = this;
                        ContainerAnonymousMethod = ec.CurrentAnonymousMethod;
                        ContainingBlock = ec.CurrentBlock;
-               
+
                        if (aec.ResolveTopBlock (ec, Block, amp, loc, out 
unreachable))
                                return new AnonymousDelegate (this, 
delegate_type, loc).Resolve (ec);
 

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

Reply via email to