[Mono-bugs] [Bug 57694][Nor] Changed - Does not flag conversion error 221.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 27 Apr 2004 11:36:42 -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 bmaurer@users.sf.net.

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

--- shadow/57694	2004-04-27 00:14:38.000000000 -0400
+++ shadow/57694.tmp.20534	2004-04-27 11:36:42.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 57694
 Product: Mono: Compilers
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Normal
 Component: C#
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: miguel@ximian.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -32,6 +32,29 @@
 	
 }
 
 
 This should flag a 221 error: constant value -2, canot be converted to A
 unless unchecked syntax is used to override.
+
+------- Additional Comments From bmaurer@users.sf.net  2004-04-27 11:36 -------
+Miguel,
+
+I do not know if this is what is happening here, but I remember 
+seeing once that cfolding is not done on bytes. Try this:
+
+enum A : byte {
+	One = 1,
+	Two = 2
+}
+
+class X {
+	static int Main ()
+	{
+		A foo = A.One | A.Two;
+	}
+	
+}
+
+This will emit CEE_OR, when it could be cfolded. If I remember 
+correctly, the process you are describing happens in the same place 
+as cfold.