Bug report
Type parameter of a function is not automatically inferred from a parameter if a class-string is used instead of an instance.
Code snippet that reproduces the problem
https://phpstan.org/r/66a6ffdd-c9f9-4f97-b952-3728df3a47a4
Expected output
T type should be automatically inferred from the OptionDefinition implementing class, the same way it does without class-string<>: https://phpstan.org/r/2dc465eb-f7cc-404a-8057-bf751ca4173b