[Mono-bugs] [Bug 36321][Nor] New - mcs incorrect CS0177 with out structs

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Sun, 5 Jan 2003 15:39:23 -0500 (EST)


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 japj@xs4all.nl.

http://bugzilla.ximian.com/show_bug.cgi?id=36321

--- shadow/36321	Sun Jan  5 15:39:23 2003
+++ shadow/36321.tmp.13240	Sun Jan  5 15:39:23 2003
@@ -0,0 +1,74 @@
+Bug#: 36321
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: japj@xs4all.nl               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs incorrect CS0177 with out structs
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+
+Steps to reproduce the problem:
+1. Try to compile the following program with mcs:
+
+class Test1
+{
+	public struct STest
+	{
+		public int x;
+	}
+	
+	public virtual bool LookupProperty(int var1, out STest var2)
+	{
+		if (var1 == 0)
+		{
+			var2.x = 10;
+			return true;
+		}
+		else
+		{
+			var2.x = var1;
+
+			return false;
+		}	
+	} 
+
+	public static void Main()
+	{
+	
+	}		
+}
+
+2. 
+3. 
+
+Actual Results:
+
+japj@debian:~/mono$ mcs test.cs
+test.cs(11) error CS0177: The out parameter `var2' must be assigned before
+control leave the current method.
+Compilation failed: 1 error(s), 0 warnings
+
+Expected Results:
+
+compilation to go ok
+
+How often does this happen? 
+Always
+
+Additional Information:
+
+I found this while trying to get janet compile with MCS