mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-19 01:31:17 -10:00
* anonymous.cs(AnonymousDelegate.Emit): Uses Constructor filter when looking for ctor. * decl.cs (MemberCache.FindMembers): When container is interface we need to search all base interfaces as a member can be ambiguous. * delegate.cs (Delegate.FindMembers): Fixed to return valid data for Constructor member type filter. (Delegate.ResolveConstructorMethod) Uses Constructor filter. * ecore.cs: (Expression.MemberLookup): Implemented ambiguity error/warning reporting for returned memberinfos. * expresssion.cs (IndexerAccess.DoResolve): Fixed to report correct error message. * report.cs: Updated. * typemanager.cs (TypeManager.LookupBaseInterfacesCache): Uses TypeManager version to work on all runtimes. (TypeManager.RealMemberLookup): Removed members filtering. svn path=/trunk/mcs/; revision=63146
32 lines
470 B
C#
32 lines
470 B
C#
// cs0467.cs: Ambiguity between method `ICounter.Count(int)' and non-method `IList.Count'. Using method `ICounter.Count(int)'
|
|
// Line: 30
|
|
// Compiler options: -warnaserror -warn:2
|
|
|
|
using System;
|
|
|
|
interface IList
|
|
{
|
|
int Count { get; set; }
|
|
}
|
|
|
|
interface ICounter
|
|
{
|
|
void Count (int i);
|
|
}
|
|
|
|
interface IEx
|
|
{
|
|
void Count (params int[] i);
|
|
}
|
|
|
|
interface IListCounter: IEx, IList, ICounter
|
|
{
|
|
}
|
|
|
|
class Test
|
|
{
|
|
static void Foo (IListCounter t)
|
|
{
|
|
t.Count (1);
|
|
}
|
|
} |