Skip to content

Setter property with [<Erase>] should be erased #3948

@MangelMaxime

Description

@MangelMaxime

Description

While working on #3929, it seems like some cases have not been covered.

This code

[<Erase>]
type internal LanguageInjectionAttribute() =
    inherit Attribute()
    
    [<Erase>]
    member val Prefix = "" with get, set

does not generate the getter but does generate the setter function:

export function LanguageInjectionAttribute__set_Prefix_Z721C83C5(__, v) {
    __["Prefix@"] = v;
}

Repro code

Please provide the F# code to reproduce the problem or a link to the REPL.
Ideally, it should be possible to easily turn this code into a unit test.

Expected and actual results

Please provide the expected and actual results.

Related information

  • Fable version: dotnet fable --version
  • Operating system

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions