http://bugzilla.novell.com/show_bug.cgi?id=603299

http://bugzilla.novell.com/show_bug.cgi?id=603299#c0


           Summary: [regression] CS0120 compiling a static method
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: C#
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---
           Blocker: ---


[mono] ~/src/bugzilla @ gmcs de.cs
de.cs(6,28): error CS0120: An object reference is required to access non-static
member `double.Equals(object)'
Compilation failed: 1 error(s), 0 warnings

[mono] ~/src/bugzilla @ cat de.cs
using System;

public static class Test {
       public static void AreEqual(double expected, double actual)
        {
                if(!Double.Equals (expected, actual))
            throw new Exception ();
    }
}

Using CSC (or older GMCS) this would compile into

call bool [mscorlib]System.Object::Equals(object,object)

-- 
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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to