[Mono-bugs] [Bug 82327][Nor] New - CS0184 always reported using is operator on nullable
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sun Aug 5 12:06:06 EDT 2007
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 gert.driesen at pandora.be.
http://bugzilla.ximian.com/show_bug.cgi?id=82327
--- shadow/82327 2007-08-05 12:06:06.000000000 -0400
+++ shadow/82327.tmp.25749 2007-08-05 12:06:06.000000000 -0400
@@ -0,0 +1,46 @@
+Bug#: 82327
+Product: Mono: Compilers
+Version: 1.2
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: gert.driesen at pandora.be
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: CS0184 always reported using is operator on nullable
+
+gmcs currently incorrectly reports error CS0184 for the following code:
+
+class Program
+{
+ static int Main ()
+ {
+ int? num1 = null;
+ if (num1 is int)
+ return 1;
+
+ int? num2 = 5;
+ if (!(num2 is int))
+ return 2;
+
+ return 0;
+ }
+}
+
+Expected result:
+
+Successful compilation
+
+Actual result:
+
+test.cs(6,26): error CS0184: The given expression is never of the provided
+(`int') type
+test.cs(10,28): error CS0184: The given expression is never of the
+provided (`int') type
More information about the mono-bugs
mailing list