fixed bug related to polymorphic parent types with inferred parameter types