You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
T-Gro
changed the title
Mixing named DUs + callback style and getter should not compile
Mixing named arguments + callback style and getter should not compile
Oct 29, 2024
typeMyFunc= string * string option -> unit
typeLabeledProperty=abstractmemberalert:title:string * message:string option -> unit with get,set abstract member alert2: string * string option -> unit with get,set abstract member alert3:(string * string option -> unit) with get,set abstract member alert4: MyFunc with get,set
It seems that it you use Item as the member name, aka Indexer properties(get, set) it adds the missing codegen. :)
typeLabeledProperty=abstractmemberItem:title:string * message:string option -> unit with get,set
[CompilationMapping(SourceConstructFlags.Module)]publicstaticclass@_{[Serializable][CompilationMapping(SourceConstructFlags.ObjectType)]publicinterfaceLabeledProperty{override Unit this[stringtitle,FSharpOption<string>message]{get;set;}}}
I think the code below should not compile.
Repro steps
Provide the steps required to reproduce the problem:
Looking at the C# output it gives the following result which looks incomplete.
Expected behavior
F# compiler should fails the compilation ?
Provide any related information (optional):
The text was updated successfully, but these errors were encountered: