[Mono-bugs] [Bug 614917] New: Implicit conversion of "(uint) 0" to enum fails

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jun 16 17:05:00 EDT 2010



           Summary: Implicit conversion of "(uint) 0" to enum fails
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: rkvinge at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

User-Agent:       Opera/9.80 (Windows NT 5.1; U; en) Presto/2.5.24

Sample code:

enum E { a, b }
class C {
  public static void Main () {
    M ((uint) 0);
  static void M (E e) {}

results in:
test.cs(6,5): error CS1502: The best overloaded method match for `C.M(E)' has
some invalid arguments
test.cs(8,15): (Location of the symbol related to previous error)
test.cs(6,5): error CS1503: Argument `#1' cannot convert `uint' expression to
type `E'
Compilation failed: 2 error(s), 0 warnings

The sample compiles successfully with csc (VS2008)

Reproducible: Always

Steps to Reproduce:

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

More information about the mono-bugs mailing list