Author: manjula
Date: 2005-03-23 22:06:32 -0500 (Wed, 23 Mar 2005)
New Revision: 42181
Modified:
trunk/mcs/mbas/ChangeLog
trunk/mcs/mbas/statement.cs
Log:
Fix bug while executing 'Exit Function'
Modified: trunk/mcs/mbas/ChangeLog
===================================================================
--- trunk/mcs/mbas/ChangeLog 2005-03-24 01:11:08 UTC (rev 42180)
+++ trunk/mcs/mbas/ChangeLog 2005-03-24 03:06:32 UTC (rev 42181)
@@ -1,3 +1,7 @@
+2005-03-24 Manjula GHM <[EMAIL PROTECTED]>
+ * statement.cs: Fix bug in 'Exit Function'
+
+
2005-23-03 Rafael Teixeira <[EMAIL PROTECTED]>
* AssemblyInfo.cs: Some more diligent authors
* ecore.cs, cfold.cs, delegate.cs: remove warnings-causing code
Modified: trunk/mcs/mbas/statement.cs
===================================================================
--- trunk/mcs/mbas/statement.cs 2005-03-24 01:11:08 UTC (rev 42180)
+++ trunk/mcs/mbas/statement.cs 2005-03-24 03:06:32 UTC (rev 42181)
@@ -1070,7 +1070,7 @@
if (ec.InLoop == false && ec.Switch == null){
if (type == ExitType.FOR)
Report.Error (30096, loc, "No
enclosing FOR loop to exit from");
- if (type == ExitType.WHILE)
+ if (type == ExitType.WHILE)
Report.Error (30097, loc, "No
enclosing WHILE loop to exit from");
if (type == ExitType.DO)
Report.Error (30089, loc, "No
enclosing DO loop to exit from");
@@ -1097,9 +1097,12 @@
ec.HasReturnLabel = true;
}
ec.ig.Emit (OpCodes.Leave,
ec.ReturnLabel);
- } else
+ } else {
+ ec.ig.Emit (OpCodes.Ldloc_0);
ec.ig.Emit (OpCodes.Ret);
+ }
+
return true;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches