You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Spec/Conformance: subtyping callables with non-constant parameter mapping. #2224
I believe from a pure type theory POV, this assignment should be legal, because all legal arguments to Make are also legal arguments to make_impl. The spec phrases it in the same spirit:
A callable type B is assignable to a callable type A if the return type of B is assignable to the return type of A and the input signature of B accepts all possible combinations of arguments that the input signature of A accepts. All of the specific assignability rules described below derive from this general rule.
changed the title [-]Spec/Conformance: subtyping callable with positional-only parameters with defaults.[/-][+]Spec/Conformance: subtyping callables with non-constant parameter mapping.[/+]on Mar 22, 2026
The spec currently doesn’t define whether parameter mapping must be consistent. This PR clarifies that non-constant parameter mappings are not assignable, aligning the spec with existing type checker behavior.
Activity
[-]Spec/Conformance: subtyping callable with positional-only parameters with defaults.[/-][+]Spec/Conformance: subtyping callables with non-constant parameter mapping.[/+]BHUVANSH855 commentedon Apr 7, 2026
Hi @srittau @randolf-scholz,
I’ve opened a PR to clarify this behavior.
The spec currently doesn’t define whether parameter mapping must be consistent. This PR clarifies that non-constant parameter mappings are not assignable, aligning the spec with existing type checker behavior.