[Mono-bugs] [Bug 516575] TestVirtualProp.Class3.Prop.set': cannot override because `TestVirtualProp.Class2.Prop' does not have an overridable set accessor(CS0546)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Dec 17 05:24:15 EST 2009


http://bugzilla.novell.com/show_bug.cgi?id=516575

http://bugzilla.novell.com/show_bug.cgi?id=516575#c1


Vadym Stetsiak <vadmyst at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vadmyst at gmail.com

--- Comment #1 from Vadym Stetsiak <vadmyst at gmail.com> 2009-12-17 10:24:13 UTC ---
Here is more simple class hierarchy that reproduces the issue.

Workaround is to add set property to the immediate base class. In the sample
below adding set to Derived1 will resolve the issue.
[code]
abstract class Base
    {
        public virtual string Accessor
        {
            get { return "base"; }
            set { }
        }
    }

    class Derived1 : Base
    {
        public override string Accessor
        {
            get { return base.Accessor; }
        }
    }

    class Derived2 : Derived1
    {
        public override string Accessor
        {
            set { }
        }
    }
[/code]

-- 
Configure bugmail: http://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