Just change it to

1
2
3
4
5
6
7
8
9
10
 

type FooRec = { bar: int } 

   with

   interface IFoo 

      with member this.Bar = this.bar + 1 

And you will be fine - just mind the "bar" VS "Bar" issue and the "with" keyword

By on 3/17/2009 10:19 PM ()

Well I understand that changing the record property name to "bar" will allow it to compile, and the "with" doesn't appear to be necessary. The issue is that I don't see why a record property can't have the same name as a member of an implemented interface. Is this a bug, or is it intended behavior, and if so, what's the rationale?

By on 3/17/2009 10:34 PM ()

This is a bug (logged as 4666); thanks.

By on 3/18/2009 11:13 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper