[Mono-bugs] [Bug 22796] New - Conflicting warnings on "is" operator
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
29 Mar 2002 21:28:52 -0000
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 duco@lorentz.xs4all.nl.
http://bugzilla.ximian.com/show_bug.cgi?id=22796
--- shadow/22796 Fri Mar 29 16:28:52 2002
+++ shadow/22796.tmp.30981 Fri Mar 29 16:28:52 2002
@@ -0,0 +1,48 @@
+Bug#: 22796
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details: SuSE Linux 7.1
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: duco@lorentz.xs4all.nl
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Conflicting warnings on "is" operator
+
+Description of Problem:
+When using is-operator in a expression that can be evaluated at compile
+time, we get a two warnings: one being the negation of the other.
+
+Steps to reproduce the problem:
+class Base {}
+
+class Derived : Base {}
+
+class Test {
+
+ public static void Main()
+ {
+ Derived d = new Derived();
+
+ if (d is Base) {
+ System.Console.WriteLine("d is base");
+ }
+
+ }
+
+Actual Results:
+./test.cs(11) warning CS0183: The expression is always of type `Base'
+./test.cs(11) warning CS0184: The expression is never of type `Base'
+
+Expected Results:
+./test.cs(11) warning CS0183: The expression is always of type `Base'
+
+How often does this happen?
+Always