[Mono-bugs] [Bug 58098][Nor] New - Assignment of out params is not tracked correctly
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 5 May 2004 21:44:38 -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 michi@zeroc.com.
http://bugzilla.ximian.com/show_bug.cgi?id=58098
--- shadow/58098 2004-05-05 21:44:38.000000000 -0400
+++ shadow/58098.tmp.32212 2004-05-05 21:44:38.000000000 -0400
@@ -0,0 +1,49 @@
+Bug#: 58098
+Product: Mono: Compilers
+Version: unspecified
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: michi@zeroc.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Assignment of out params is not tracked correctly
+
+mcs complains about the following:
+
+class Y
+{
+ public int bar(out int i)
+ {
+ i = 0;
+ return 0;
+ }
+}
+
+class X
+{
+ public int foo(out int i)
+ {
+ return _y.bar(i);
+ }
+
+ private Y _y;
+}
+
+$ mcs x.cs
+x.cs(14) error CS0165: Use of unassigned parameter `i'
+Compilation failed: 1 error(s), 0 warnings
+
+That's not correct -- in foo, I is set by passing it to bar. The same code
+compiles without error with MS Visual C#.
+
+Cheers,
+
+Michi.