Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug[next]: Fix accept args #1830

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tehrengruber
Copy link
Contributor

type_info.accept_args is used in the iterator type inference to check if a node with type ts.FunctionType is callable for a given set of arguments here. This failed when the function type had an iterator argument with position_dims="unknown". This PR promotes the _is_compatible_type function from the iterator type inference to a shared function available in all type systems and switches accept_args (or more precisely function_signature_incompatibilities_func) to use that function instead of is_concretizable.

Additionally this PR contains a small cleanup of the type deduction / type system tests:

  • test_type_deduction.py was moved from integration to unit tests (as it only contains unit tests).
  • All type system tests are moved from test_type_deduction.py as they are not specific to the frontend type deduction.

and a_arg != b_arg
and not is_concretizable(a_arg, to_type=b_arg)
):
if b_arg is not UNDEFINED_ARG and a_arg != b_arg and not is_compatible_type(a_arg, b_arg):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and the change below is only real change in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants