I have a Vavr Try pipeline of this form:
On a failure in process, this pipeline should enter recover and supply a Ref.Uri, then do the final map. However, this fails with a ClassCastException: cannot convert Ref.Uri to Ref.File. Apparently, the compiler infers Ref.Uri as the return value from the first map (which is legitimate), but then it fails to produce a compile-time error when recover presents a then-incompatible Ref.File. The compiler should either (ideally) recognize that the desired type is superclass Ref or, more simply but at least correctly, produce a compile-time error until a type witness is inserted (and observed).