When [<AttachMembers>] is used, a static meber inline gets erased as expected from the class.
But it is not inlined at call site.
So invalid JS is emited.
for example:
open Fable.Core
[<AttachMembers>]
type Foo() =
static member inline one = Foo()
let baz = Foo.one // emits const baz = Foo.one; but should emit Foo_$ctor()
see REPL (v5.0.0)
Yes, this example is contrived. A simple F# module would make more sense here. And [<AttachMembers>] is also unsafe with overloads. But it might still be worth fixing that.
When
[<AttachMembers>]is used, astatic meber inlinegets erased as expected from the class.But it is not inlined at call site.
So invalid JS is emited.
for example:
see REPL (v5.0.0)
Yes, this example is contrived. A simple F# module would make more sense here. And
[<AttachMembers>]is also unsafe with overloads. But it might still be worth fixing that.