dotnet-websharper / core

WebSharper - Full-stack, functional, reactive web apps and microservices in F# and C#
https://websharper.com
Apache License 2.0
589 stars 52 forks source link

F# object expression with member using implicit generics #1375

Closed Jand42 closed 6 months ago

Jand42 commented 6 months ago

The following F# code

type IParseState =
    abstract RaiseError<'b> : unit -> 'b

let parseState =                                                                                            
    { new IParseState with 
        member _.RaiseError()  = raise <| System.Exception("asd")
    }

fails with Method not found in JavaScript compilation: (RaiseError<_> : unit -> '?), Candidates: (RaiseError<_> : unit -> 'T0) because the implicit type argument is not resolved. Look up implemented method by name if generics is missing.