[Mono-bugs] [Bug 335104] New: missing CS0019: comparison between value type and null is allowed

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Oct 19 01:37:47 EDT 2007


https://bugzilla.novell.com/show_bug.cgi?id=335104

           Summary: missing CS0019: comparison between value type and null
                    is allowed
           Product: Mono: Compilers
           Version: 1.2
          Platform: i586
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: rharinath at novell.com
        ReportedBy: atsushi at ximian.com
         QAContact: mono-bugs at ximian.com
          Found By: ---


I hope the summary mostly explains:

--------
using System;
using System.Runtime.Serialization;

public class Test
{
        static StreamingContext ctx;

        public static void Main ()
        {
                if (ctx == null)
                        throw new Exception ();
        }
}

Expected Result (like csc):
zzz.cs(10,7): error CS0019: Operator '==' cannot be applied to operands of type
        'System.Runtime.Serialization.StreamingContext' and '<null>'

Actual Result: no error.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list