[Mono-bugs] [Bug 56821][Wis] Changed - Constant folding is not done on true || x
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 11 Apr 2004 23:02:01 -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=56821
--- shadow/56821 2004-04-11 22:46:25.000000000 -0400
+++ shadow/56821.tmp.8938 2004-04-11 23:02:01.000000000 -0400
@@ -1,14 +1,14 @@
Bug#: 56821
Product: Mono: Compilers
Version: unspecified
-OS:
+OS: unknown
OS Details:
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Wishlist
Component: C#
AssignedTo: mono-bugs@ximian.com
ReportedBy: bmaurer@users.sf.net
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
@@ -60,6 +60,24 @@
static void Main () {
}
}
Does not compile. Sorta weird, because this means there must be 2 constant
resolution stages.
+
+------- Additional Comments From bmaurer@users.sf.net 2004-04-11 23:02 -------
+This could get pretty complicated:
+class T {
+ bool b;
+ const bool FOO = true;
+ static T a;
+ static T c;
+ static void Main () {
+ int i;
+ if ((c.b || FOO) && (a.b ? true : true))
+ i = 1;
+
+ System.Console.WriteLine (i);
+ }
+}
+
+You have to get the side effects *EXACTLY*, ie, load c.b and a.b