I try to use member constraint with my inline function like this:
let inline extractMessageAsync
(envelope: ^env when ^env:
(member GetBodyAsync: unit-> Task<'a>)) =
envelope.GetBodyAsync()
But I get the following error:
Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved.
Although I understand that compiler needs more info about this type, I don't understand why, especially since it works just fine with static member constraints for operators like (+) or (*) etc.