[Mono-bugs] [Bug 46949][Nor] New - Incorrect CS0177 error
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Sat, 26 Jul 2003 13:17:26 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by lluis@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=46949
--- shadow/46949 Sat Jul 26 13:17:26 2003
+++ shadow/46949.tmp.19734 Sat Jul 26 13:17:26 2003
@@ -0,0 +1,55 @@
+Bug#: 46949
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: lluis@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Incorrect CS0177 error
+
+Description of Problem:
+mcs gives an incorrect CS0177 error (out parameter not assigned) in the
+provided test case.
+
+Steps to reproduce the problem:
+Compile this:
+
+public class TestClass
+{
+ public string TestMethod (out string outparam)
+ {
+ try
+ {
+ if (true)
+ {
+ outparam = "";
+ return "";
+ }
+ }
+ catch
+ {
+ }
+
+ outparam = null;
+ return null;
+ }
+}
+
+Actual Results:
+error CS0177: The out parameter `outparam' must be assigned before control
+leave the current method.
+
+Expected Results:
+Compilation succeeded.
+
+How often does this happen?
+Allways