Bug 320475 (MONO77712) - [GMCS] incorrect CS0121 - call to base overriden methods are said ambiguous
Summary: [GMCS] incorrect CS0121 - call to base overriden methods are said ambiguous
Status: RESOLVED FIXED
Alias: MONO77712
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-03-06 08:41 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:50:34 UTC


---- Reported by atsushi@ximian.com 2006-03-06 01:41:56 MST ----

gmcs is confused and reports ambiguity for call to an overriden base method
among further base methods.

--------
class Foo<T>
{
        internal virtual void Hoge (T obj)
        {
        }
}

class Bar<T> : Foo<T>
{
        internal override void Hoge (T obj)
        {
        }
}

class Baz : Bar<string>
{
        internal override void Hoge (string obj)
        {
                base.Hoge (obj);
        }
}

Actual Results:

override-override-override.cs(19,8): error CS0121: The call is ambiguous
between the following methods or properties: `Foo<string>.Hoge(in string)'
and `Bar<string>.Hoge(in string)'
override-override-override.cs(3,24):: `Foo<T>.Hoge(T)', name of symbol
related to previous error
override-override-override.cs(10,25):: `Bar<T>.Hoge(T)', name of symbol
related to previous error
Compilation failed: 1 error(s), 0 warnings

Expected Results:

no CS0121 error.

How often does this happen? 

consistently.

Additional Information:

It still happens when you replace "string" with a generic type argument.



---- Additional Comments From atsushi@ximian.com 2006-03-06 02:50:20 MST ----

r57569 works fine, while r57570 does not. It also seems already
backported to 1-1-13 branch.

Additional information: it only happens to "base" access. Having
another member to call those Hoge() does not raise any errors.



---- Additional Comments From martin@ximian.com 2006-03-09 07:17:19 MST ----

.


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