Author: martin
Date: 2005-03-17 07:42:30 -0500 (Thu, 17 Mar 2005)
New Revision: 41943
Modified:
trunk/mcs/gmcs/ChangeLog
trunk/mcs/gmcs/anonymous.cs
Log:
2005-03-17 Martin Baulig <[EMAIL PROTECTED]>
* anonymous.cs (AnonymousMethod.EmitMethod): Changed return type
to bool so we can return an error condition.
(AnonymousDelegate.Emit): Check whether AnonymousMethod.EmitMethod()
returned an error.
Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog 2005-03-17 12:31:38 UTC (rev 41942)
+++ trunk/mcs/gmcs/ChangeLog 2005-03-17 12:42:30 UTC (rev 41943)
@@ -1,5 +1,12 @@
2005-03-17 Martin Baulig <[EMAIL PROTECTED]>
+ * anonymous.cs (AnonymousMethod.EmitMethod): Changed return type
+ to bool so we can return an error condition.
+ (AnonymousDelegate.Emit): Check whether AnonymousMethod.EmitMethod()
+ returned an error.
+
+2005-03-17 Martin Baulig <[EMAIL PROTECTED]>
+
* generic.cs (TypeMananager.IsIEnumerable): New public method.
* convert.cs (Convert.ImplicitReferenceConversion(Exists)): Allow
Modified: trunk/mcs/gmcs/anonymous.cs
===================================================================
--- trunk/mcs/gmcs/anonymous.cs 2005-03-17 12:31:38 UTC (rev 41942)
+++ trunk/mcs/gmcs/anonymous.cs 2005-03-17 12:42:30 UTC (rev 41943)
@@ -293,10 +293,10 @@
return method.MethodData.MethodBuilder;
}
- public void EmitMethod (EmitContext ec)
+ public bool EmitMethod (EmitContext ec)
{
if (!CreateMethodHost (ec, invoke_mb.ReturnType))
- return;
+ return false;
MethodBuilder builder = GetMethodBuilder ();
ILGenerator ig = builder.GetILGenerator ();
@@ -313,6 +313,7 @@
aec.EmitMeta (Block, amp);
aec.EmitResolvedTopBlock (Block, unreachable);
+ return true;
}
public static void Error_AddressOfCapturedVar (string name,
Location loc)
@@ -338,12 +339,14 @@
public override Expression DoResolve (EmitContext ec)
{
eclass = ExprClass.Value;
+
return this;
}
public override void Emit (EmitContext ec)
{
- am.EmitMethod (ec);
+ if (!am.EmitMethod (ec))
+ return;
//
// Now emit the delegate creation.
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches