This:

1
2
3
4
5
6
type RN () =
    ...
    [<Name "X">]
    member this.RNValue 
        with get() = y
        and  set v = y <- v

will fail in strict mode if we have a test case like this:

1
2
3
4
5
    let o = RN()
    ...
    equal o.RNValue 1
    o.RNValue <- 2
    equal o.RNValue 2
  • loic.denuziere

    The problem is not quite caused by strict mode, but it was revealed by it. The getter and setter are both compiled to the same name, and IE rejects object literal with the same field twice (other browsers are OK with it strangely enough).

  • github

    This topic has been closed.