https://bugzilla.novell.com/show_bug.cgi?id=357287
Summary: Access hiding properties of interfaces resolves wrong
member
Product: Mono: Compilers
Version: 1.2.6
Platform: x86
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
Created an attachment (id=192357)
--> (https://bugzilla.novell.com/attachment.cgi?id=192357)
More detailed test case
mcs and gmcs fail on the following test case:
interface IA
{
string val { get; set; }
}
interface IAI : IA
{
new int val { get; set; }
}
interface IAI2 : IAI { }
class AI2 : IAI2
{
public int val { get { return 42; } set { } }
string IA.val { get { return "13"; } set { } }
public void stuff(IAI2 other)
{
val = other.val;
}
}
Compiler error message on Mono 1.2.6 and 1.2.5:
interfaceTest.cs(52,17): error CS0029: Cannot implicitly convert type `string'
to `int'
Compiler error message on Mono 1.2.2:
interfaceTest.cs(52,9): error CS0229: Ambiguity between `IAI.val' and `IA.val'
interfaceTest.cs(10,10): (Location of the symbol related to previous error)
interfaceTest.cs(5,9): (Location of the symbol related to previous error)
interfaceTest.cs(52,9): error CS0122: `IA.val' is inaccessible due to its
protec
tion level
interfaceTest.cs(5,9): (Location of the symbol related to previous error)
Expected result:
Compiles without problems (as it does on .NET)
The attachement shows, that the third interface IAI2 is required. The bug also
does not appear when "stuff" gets an AI2 object as parameter.
--
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