A fix for bug #80108
* ecore.cs (EventExpr.EmitAddOrRemove): Don't crash when right side is not
compatible.
svn path=/trunk/mcs/; revision=68841
+2006-12-01 Marek Safar <marek.safar@gmail.com>
+
+ A fix for bug #80108
+ * ecore.cs (EventExpr.EmitAddOrRemove): Don't crash when right side is not
+ compatible.
+
2006-11-30 Marek Safar <marek.safar@gmail.com>
Correct unary operators implementation (part I)
public void EmitAddOrRemove (EmitContext ec, Expression source)
{
- BinaryDelegate source_del = (BinaryDelegate) source;
+ BinaryDelegate source_del = source as BinaryDelegate;
+ if (source_del == null) {
+ Emit (ec);
+ return;
+ }
Expression handler = source_del.Right;
Argument arg = new Argument (handler, Argument.AType.Expression);