[Mono-bugs] [Bug 406633] New: Overloaded ToString method not found in iterator
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sun Jul 6 12:47:46 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=406633
Summary: Overloaded ToString method not found in iterator
Product: Mono: Compilers
Version: 1.9.0
Platform: x86
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: edlothiol at web.de
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Description of Problem:
The following source yields an error when I try to compile it with gmcs:
using System;
using System.Collections.Generic;
public abstract class TestClass
{
public abstract void ToString(object obj);
public IEnumerable<object> TestEnumerator()
{
ToString(null); // No overload for method `ToString' takes `1'
arguments (CS1501)
yield break;
}
public void Test()
{
ToString(null); // No error here
}
}
Changing the method name to something other than ToString solves the problem.
Also, it doesn't occur in the non-iterator method. (It also doesn't depend on
ToString being abstract or its return type and parameters.)
Steps to reproduce the problem:
1. Try to compile the above code with gmcs (as a library).
Actual Results:
The error "No overload for method `ToString' takes `1' arguments (CS1501)"
occurs in the TestEnumerator method.
Expected Results:
It should compile, as it does with csc.
How often does this happen?
Everytime.
Additional Information:
Tested with Mono 1.9.1 under Ubuntu and Mono 1.9 under Windows XP.
--
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.
More information about the mono-bugs
mailing list