Thursday, December 17, 2009

Mono: C# compiler bug with property inheritance

The bug appeared quite unexpectedly.
In Visual Studio code sample below compiled fine. But doing the same with Mono C# compiler results in error: Compiler Error CS0546: 'Derived2.Accessor.set': cannot override because 'Base.Accessor' does not have an overridable set accessor.
It must've been a bug with the compiler I thought to myself. Mono bugzilla search confirmed that bug was there.

Here is the code sample that produces error report (workaround is described under it):

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 { }
        }
    }
Workaround for this error is to add set property to Derived1 class:
public override string Accessor
        {
            get { return base.Accessor; }
            set { base.Accessor = value; }
        }
Happy coding :)

13 comments:

  1. [u][b]Xrumer[/b][/u]

    [b]Xrumer SEO Professionals

    As Xrumer experts, we from been using [url=http://www.xrumer-seo.com]Xrumer[/url] for the benefit of a wish immediately things being what they are and remember how to harness the massive power of Xrumer and go off it into a Cash machine.

    We also purvey the cheapest prices on the market. Diverse competitors desire order 2x or even 3x and a lot of the term 5x what we responsibility you. But we believe in providing gigantic mending at a tearful affordable rate. The whole incidental of purchasing Xrumer blasts is because it is a cheaper variant to buying Xrumer. So we aim to keep that mental activity in cognizant and provide you with the cheapest grade possible.

    Not solitary do we cause the greatest prices but our turnaround in the good old days b simultaneously for the treatment of your Xrumer posting is super fast. We drive have your posting done ahead of you certain it.

    We also outfit you with a sated log of successful posts on different forums. So that you can catch a glimpse of for yourself the power of Xrumer and how we get harnessed it to benefit your site.[/b]


    [b]Search Engine Optimization

    Using Xrumer you can think to distinguish thousands upon thousands of backlinks in behalf of your site. Tons of the forums that your Place you intent be posted on bear high PageRank. Having your tie-in on these sites can categorically mitigate strengthen up some crown grade endorse links and as a matter of fact boost your Alexa Rating and Google PageRank rating utterly the roof.

    This is making your position more and more popular. And with this developing in celebrity as superbly as PageRank you can think to see your area in effect superiority gamy in those Search Mechanism Results.
    Above

    The amount of transportation that can be obtained before harnessing the power of Xrumer is enormous. You are publishing your locality to tens of thousands of forums. With our higher packages you may even be publishing your site to HUNDREDS of THOUSANDS of forums. Visualize 1 brief on a stylish forum last will and testament almost always cotton on to a leave 1000 or so views, with say 100 of those people visiting your site. These days devise tens of thousands of posts on celebrated forums all getting 1000 views each. Your freight ordain associate because of the roof.

    These are all targeted visitors that are interested or exotic about your site. Imagine how assorted sales or leads you can succeed in with this colossal number of targeted visitors. You are literally stumbling upon a goldmine friendly to be picked and profited from.

    Keep in mind, Transport is Money.
    [/b]

    GET YOUR CHEAP ERUPTION TODAY:


    http://www.xrumer-seo.com

    ReplyDelete
  2. Amiable fill someone in on and this post helped me alot in my college assignement. Gratefulness you seeking your information.

    ReplyDelete
  3. Hello

    I just joined this good place. I found loads of useful information here. Please accept my little contribution towards community. I would like to share some [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]quick weight loss tips[/url]. If you need to know how to lose 10 lb in a calendar week, you are probably not searching for a standard dieting and work out plan. You can lose weight with a regular diet and exercise plan, Still this requires a lot of time doing utmost cardio exercises and sticking with a strict diet. Here I will draft the right steps that I took to lose 10 pounds in just a workweek.

    1. Keep Distance from all fried foods for the week
    2. Drink In an 8oz glass of Citrus paradisi with breakfast each day. (this accelerates up your metabolism)
    3. Eat limited portions (stop consuming when you are full)
    4. Instead of taking 3 huge a meals a day, eat up 5-6 small meals to keep your metabolism up and keep your body burning fat.
    5. Do not eat anything after 9pm. Calories do not burn, when you eat so late.
    6. Proper sleep is necessary everyday.. Not taking adequate rest has been proven to be a major factor to the body putting up excess fat.
    7. Apply a body/colon clean for the 7 days. This will get rid of unneeded weight stored around the stomach area as well as cleanse your body of harmfull pollutants that cause you store fat and feel tired. Flush away excess pounds around the stomach area that otherwise would be hard to lose.
    8. I reccomend you using Acai Berry Diet Pills. This one is tested to work, and you can get a free trial.
    9. For those individuals who need to burn fat quickly, avoid alcohol.
    10[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url] A low GI diet is an superior method of loosing fat quickly.

    Thanks![url=http://www.weightrapidloss.com].[/url]!

    ReplyDelete
  4. Opulently I agree but I about the list inform should prepare more info then it has.

    ReplyDelete
  5. Hello everyone! I don't know where to begin but hope this place will be useful for me.
    In first steps it is very nice if someone supports you, so hope to meet friendly and helpful people here. Let me know if I can help you.
    Thanks and good luck everyone! ;)

    ReplyDelete
  6. http://studencki-kredyt.pl/wyniki/mapa1.html
    [url=http://studencki-kredyt.pl/blona-dziewicza.html]Blona dziewicza[/url]
    http://studencki-kredyt.pl/zycie-studenckie.html

    ReplyDelete
  7. Dear Alicia,

    For long time I use this free software: [url=http://www.freeflvtomp3converter.com]FLV to MP3 free converter[/url].

    FLV to MP3 free converter is a free YouTube, MegaVideo, Hallpass and similar video sites to MP3 Converter and allows you to convert a video to MP3 file.

    This software is fast, free, and requires no signup. All you need is a FLV Video file, and this software will extract the MP3, and give you an audio file.

    So you are able to listen to your favorite YouTube tracks on every MP3 player.

    You can download it for free at [url=http://www.freeflvtomp3converter.com]www.freeflvtomp3converter.com[/url].

    I hope this help you.

    ReplyDelete
  8. This might be a bit off-topic but I believe there are a lot of smokers here on www.blogger.com. I decided to find a good vendor of e-smokes. I'm done with paying so much for tobacco smokes.A friend recommended [url=http://www.insanereleases.info/greensmokef.html]G Smoke[/url] According to their website this is how they described their product:
    "Green Smoke offers quality Electronic cigarettes with spendable cartridges that produce the highest smoke volume in the industry. With a collection of flavors and nicotine levels, Green Smoke's™ patented technology offers convenience and performance that is unmatched. G Smoke products have been independently tested for safety."
    I'm thinking of buying them. Anyone else have experience with this e-cigarette?

    ReplyDelete
  9. Coach is a topping American designer of luxury goodies, clear from handbags coach handbags to jewelry and sunglasses to shoes. The coach gives one of the most popular and superior designer handbags and accessories on the market name. They are distributed through Coach 400 stores and more than 1200 joint U.S. retail. As a result of solid marketplace competition, [url=http://www.discountoncoach.com]coach online store[/url] website, as well as retailers are promoting and offering Coach handbags outlet coupons for reduced prices. These coupons are emailed to clients or it can be exploited by visiting the discount coupons offered by the company websites. You can easily find websites offering a Coach Outlet Coupon through the popular search engines. What you need to do is simply type the words "Coach Discounted Coupons" and you will get a list of sites from where you can avail promotional or discounted coupons for the purpose of buying purses and handbags of you desired brand. Some other search terms which can help you to find out a Coach Outlet Coupon include "coach shoes discount", "coach coupon codes", "coach promo codes", "coach discount handbags", "coach promotional codes", "coach purses discount", "coach bags discount", and "coach bag coupons".

    To shop for fashionable [url=http://www.discountoncoach.com/coach/leather-bags]Coach Leather Bags[/url], visit [url=http://www.discountoncoach.com/coach/handbags]Coach Handbags[/url] Online Store. We give you best in the world and that too at very high discounted rate.

    ReplyDelete
  10. i definitely adore your posting style, very interesting.
    don't give up as well as keep writing mainly because it simply just well worth to read it,
    excited to looked over far more of your current posts, good bye!

    ReplyDelete
  11. Awesome! what a heavy beautiful blog
    full software download Full software download

    ReplyDelete
  12. if you guys meaningful to taking [url=http://www.generic4you.com]viagra[/url] online you can do it at www.generic4you.com, the most trusted viagra drugstore seeking generic drugs.
    you can mobilize up drugs like [url=http://www.generic4you.com/Sildenafil_Citrate_Viagra-p2.html]viagra[/url], [url=http://www.generic4you.com/Tadalafil-p1.html]cialis[/url], [url=http://www.generic4you.com/VardenafilLevitra-p3.html]levitra[/url] and more at www.rxpillsmd.net, the chief [url=http://www.rxpillsmd.net]viagra[/url] informant on the web. well another great [url=http://www.i-buy-viagra.com]viagra[/url] pharmacy you can find at www.i-buy-viagra.com

    ReplyDelete
  13. Hello people,

    What online fanzines do you read and would recommend?

    For all you emo folks out there I recommend The Enough Fanzine. It is one of the first hardcore zines on the internet.

    They have throusands of interviews from the most independent bands all over the world. Check them out online: [url=http://www.enoughfanzine.com]Enough Fanzine[/url]. Best of it all, they are 100% non-profit and just helping the scene!

    Looking forward to your recommendations.

    Cheers!

    ReplyDelete