[Mono-bugs] [Bug 663105] New: mcs won't compare a struct to null

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jan 7 13:51:41 EST 2011



           Summary: mcs won't compare a struct to null
    Classification: Mono
           Product: Mono: Compilers
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: msafar at novell.com
        ReportedBy: eric.slosser at v-fx.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Third Party Developer/Partner
           Blocker: ---

Created an attachment (id=407411)
 --> (http://bugzilla.novell.com/attachment.cgi?id=407411)
source to demonstrate the bug

Description of Problem:
ccs can compare a struct to null, mcs can't. 

Steps to reproduce the problem:
- unpack the archive
- open Frameworks.sln in Visual Studio (2010, use Frameworks08.sln for
VisStudio 2008)
- set config to 'debug/x86'
- build

- open Program.sln in Visual Studio, set config as above, build

- run Program.exe, you'll see

    evaluating == null
    Field operator == (Field,Field)
    evaluating != null
    Field operator != (Field,Field)
    Field operator == (Field,Field)
    Expected: 'True False', Observed: True False, SUCCESS

- build Program.sln with MonoDevelop
    (note, you'll get CS0472 on lines 12 & 14)
- run Program.exe

    evaluating == null
    evaluating != null
    Expected: 'True False', Observed: False True, FAILURE

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