This parameter will be used to choose the most specific type that also match API defined type:
choose the most specific type like (current behavior)
if it is assignable from the passed preferred type use it
otherwise use the passed preferred type
This need a lot of testing since it impact the all API. Tests should also be improved to check if the returned object is assignable from the specified API class.
This parameter will be used to choose the most specific type that also match API defined type:
This need a lot of testing since it impact the all API. Tests should also be improved to check if the returned object is assignable from the specified API class.
see this discussion for an example.