[Mono-bugs] [Bug 75319][Nor] New - missing CS0023 check (not
applicable operator unary plus)
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sun Jun 19 13:39:10 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=75319
--- shadow/75319 2005-06-19 13:39:10.000000000 -0400
+++ shadow/75319.tmp.7562 2005-06-19 13:39:10.000000000 -0400
@@ -0,0 +1,41 @@
+Bug#: 75319
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: atsushi at ximian.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: missing CS0023 check (not applicable operator unary plus)
+
+With the code below, unary + operator should check the type of the operand
+and raise CS0023 error.
+
+class X {
+ static void Main () {
+ bool b = +true;
+ }
+}
+
+
+Actual Results:
+compiles without warning.
+
+Expected Results:
+$ csc unary-plus.cs -nologo
+unary-plus.cs(3,12): error CS0023: Operator '+' cannot be applied to
+operand of type 'bool'
+
+How often does this happen?
+consistently.
+
+Additional Information:
+unary minus operator does expected check.
More information about the mono-bugs
mailing list