[Mono-bugs] [Bug 75721][Nor] Changed - CS0165: incorrect flow
branching on member access to an unassigned class instance
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Aug 22 15:42:21 EDT 2005
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 atsushi at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=75721
--- shadow/75721 2005-08-05 00:50:40.000000000 -0400
+++ shadow/75721.tmp.18601 2005-08-22 15:42:20.000000000 -0400
@@ -1,23 +1,23 @@
Bug#: 75721
Product: Mono: Compilers
Version: 1.0
-OS:
+OS: unknown
OS Details:
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Normal
Component: C#
AssignedTo: mono-bugs at ximian.com
ReportedBy: gert.driesen at pandora.be
QAContact: mono-bugs at ximian.com
TargetMilestone: ---
URL:
Cc:
-Summary: CS0165 is not reported. Breaks Mono build on Windows.
+Summary: CS0165: incorrect flow branching on member access to an unassigned class instance
To reproduce this issue, compile the following code snippet:
using System.Collections;
public class EntryPoint {
@@ -67,6 +67,36 @@
expression.cs(3375,10): error CS0165: Use of unassigned local
variable 'fb'
expression.cs(3406,10): error CS0165: Use of unassigned local
variable 'fb'
make[1]: *** [mbas.exe] Error 1
make[1]: Leaving directory `/cygdrive/d/projects/mono/head/mcs/mbas'
+
+------- Additional Comments From atsushi at ximian.com 2005-08-22 15:42 -------
+similar case:
+
+----
+using System.Collections;
+
+public class EntryPoint {
+ public static void Main() {
+ ArrayList fields = new ArrayList();
+
+ Field fb;
+ while (fields.Count > 0) {
+ fb = (Field) fields[0];
+ }
+
+ if (fb.Name != "b") {
+ System.Console.WriteLine ("shouldn't compile here.");
+ }
+ }
+
+ public class Field
+ {
+ public string Name;
+ }
+}
+
+There are many possibilities to change code condition.
+
+Note that mcs/errors/cs0165*.cs are correctly rejected.
More information about the mono-bugs
mailing list