This PR adds a simple Unifier class to match call arguments against a generic signature and try to resolve type parameter substitutions.
The unification process is currently quite strict, checking type equality when a type variable is used in multiple places.
A different approach could be to automatically widen the type if possible.
The unifier doesn't support passing unapplied generic types as arguments yet.
This could be implement by generalized the substitutions merging process to handle subtype constraints, but it might be overkill for the scope of this project
This PR adds a simple Unifier class to match call arguments against a generic signature and try to resolve type parameter substitutions.
The unification process is currently quite strict, checking type _equality_ when a type variable is used in multiple places.
A different approach could be to automatically widen the type if possible.
The unifier doesn't support passing unapplied generic types as arguments yet.
This could be implement by generalized the substitutions merging process to handle subtype constraints, but it might be overkill for the scope of this project
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR adds a simple Unifier class to match call arguments against a generic signature and try to resolve type parameter substitutions.
The unification process is currently quite strict, checking type equality when a type variable is used in multiple places.
A different approach could be to automatically widen the type if possible.
The unifier doesn't support passing unapplied generic types as arguments yet.
This could be implement by generalized the substitutions merging process to handle subtype constraints, but it might be overkill for the scope of this project