Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing attributes information on setter of a property (in FSharpMemberOrFunctionOrValue type) #18157

Open
MangelMaxime opened this issue Dec 17, 2024 · 1 comment

Comments

@MangelMaxime
Copy link

Hello,

I am not sure how to report this bug because this is related to the internals of F# Compiler itself, and happening inside of Fable transformation.

In Fable, we want to erase types and properties decorated with [<Erase>].

For example, this code should emit nothing.

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

However, currently it does not seems possible to do it for the setter because it is missing the [<Erase>] attribute information:

Image

Please tell me, if I can do anything to reword my issue or help you identify the cause of this problem.

@vzarytovskii
Copy link
Member

Yeah, I don't think attributes are universally propagated to property methods. One of the reasons is that targets on attributes can be incorrect for methods. Which is fine from the runtime perspective, but semantically incorrect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: New
Development

No branches or pull requests

2 participants