I guess MeshData is a struct.

1
2
3
4
5
6
7
8
9
10
11
 

[<Struct>]
type S =
    val mutable x : int
    member this.X with get() = this.x and set(z) = this.x <- z

let Foo (s:S) =
    s.X <- 3 // error here if S is struct, not if S is class
    let mutable t = s
    t.X <- 3 // always ok

You can fix it by making a mutable copy, as in the last two lines above.

By on 4/11/2009 1:20 PM ()
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