When attempting to supply a fake delegate for a method with an optional parameter in a faked object
type MyType () =
abstract B: ?s:string -> unit
default x.B (?s: string) = Option.iter (printfn "Implemented: %s") s
[<Property>]
let doit () =
let a = A.Fake<MyType>()
A.CallTo(fun () -> a.B(ignored())).Invokes(fun s -> Option.iter (printfn "Faked: %s") s)
a.B "Hello"
FakeItEasy complains
FakeItEasy.Configuration.FakeConfigurationException: Argument constraint is of type System.String, but parameter is of type Microsoft.FSharp.Core.FSharpOption`1[System.String]. No call can match this constraint.
Is there a way to make this run without changing the type definition ?