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

https://bugzilla.novell.com/show_bug.cgi?id=685923#c0


           Summary: [Flow-analysis] Missing CS0165 on folded expressions
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---
           Blocker: ---


class Program
{
    public static void Main()
    {
        int i1, i2, i3;

        // 'as' is not permitted in a constant expression.
        if (null as object == null)
            i1 = 1;

        // 'is' is not permitted in a constant expression.
        if (!(null is object))
            i2 = 1;

        int j4 = 0;
        if ((0 == (j4 & 0)) && (0 == (0 & j4)))
            i3 = 1;

        System.Console.WriteLine("{0}{1}{2}{3}{4}{5}", i1, i2, i3);
    }
}

No error with mono

NET

error CS0165: Use of unassigned local variable 'i1'
error CS0165: Use of unassigned local variable 'i2'
error CS0165: Use of unassigned local variable 'i3'

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to