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


           Summary: Call to ToString fails
           Product: Mono: Compilers
           Version: 2.0.x
          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: ---


The following program fails to compile, complaining that there is no ToString()
method that takes zero arguments.   This is distilled from a larger program:

using System;
using System.Collections.Generic;

public abstract class AnyObjectId : IComparable<ObjectId>, IComparable
{
        public override string ToString()
        {
                return "Foo";
        }
}

public class ObjectId : AnyObjectId
{
        public static string ToString (ObjectId i)
        {
                return i != null ? i.ToString() : "Foo";
        }
}

The compiler reports:

ObjectId.cs(16): error CS1501: No overload for method `ToString' takes `0'
arguments


-- 
Configure bugmail: https://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