Defining property with getter and setter and name in strict mode #657

Closed
Jooseppi12 opened this Issue Feb 10, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@Jooseppi12
Member

Jooseppi12 commented Feb 10, 2017

This:

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:

    let o = RN()
    ...
    equal o.RNValue 1
    o.RNValue <- 2
    equal o.RNValue 2

Jooseppi12 added a commit that referenced this issue Feb 10, 2017

@Tarmil

This comment has been minimized.

Show comment
Hide comment
@Tarmil

Tarmil Feb 10, 2017

Member

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).

Member

Tarmil commented Feb 10, 2017

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).

@Jand42 Jand42 closed this in e74deb3 Feb 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment