[Mono-bugs] [Bug 536593] MCS cannot compile field assignment to class with multiple fields with the same name
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sun Aug 29 23:26:47 EDT 2010
https://bugzilla.novell.com/show_bug.cgi?id=536593
https://bugzilla.novell.com/show_bug.cgi?id=536593#c5
Len Trigg <len at netvalue.net.nz> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |len at netvalue.net.nz
--- Comment #5 from Len Trigg <len at netvalue.net.nz> 2010-08-30 03:26:44 UTC ---
This code compiles and runs under csc, but mono (I am using 2.4.3) cannot
compile it, failing with the same error message as this bug. In this case we do
not have two Fields, but one property and one method.
using System;
public abstract class Foo {
public abstract long Length {get;}
}
public abstract class Bar : Foo {
public override long Length {get{ return 1;}}
}
public abstract class Baz : Bar {
public new abstract long Length();
}
public class B1 : Baz {
public override long Length() { return 2;}
}
public class Test
{
public static void Something(Baz baz) {
Console.WriteLine("Length method: " + baz.Length());
Console.WriteLine("Length property: " + ((Bar)baz).Length);
}
static void Main() {
Something(new B1());
}
}
In our case Foo is System.IO.Stream, and Bar and Baz are classes in a third
party library.
--
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