Bug 320287 (MONO77509) - [GMCS] CS0121 - a call is ambiguous between the base class and generic derived class
Summary: [GMCS] CS0121 - a call is ambiguous between the base class and generic derive...
Status: RESOLVED FIXED
Alias: MONO77509
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-09 17:08 UTC by Atsushi Enomoto
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:47:45 UTC


---- Reported by atsushi@ximian.com 2006-02-09 10:08:58 MST ----

The example code below fails to compile because of incorrectly computed
ambiguity:

using System;

class DerivedGenericClass<T> : BaseClass // this <T> causes the bug
{
        public override void Foo () {}

        public void Baz ()
        {
                Foo ();
        }
}

abstract class BaseClass
{
        public abstract void Foo ();
}


Actual Results:

foo.cs(9,3): error CS0121: The call is ambiguous between the following
methods o
r properties: `BaseClass.Foo()' and `DerivedGenericClass<T>.Foo()'
foo.cs(15,23):: `BaseClass.Foo()', name of symbol related to previous error
foo.cs(5,23):: `DerivedGenericClass<T>.Foo()', name of symbol related to
previou
s error
Compilation failed: 1 error(s), 0 warnings

Expected Results:

no error other than CS5001 (entrypoint not found).

How often does this happen? 

consistently.



---- Additional Comments From martin@ximian.com 2006-02-10 05:23:14 MST ----

Fixed in SVN.


Unknown operating system unknown. Setting to default OS "Other".