File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -2338,12 +2338,10 @@ def apply_inferred_arguments(
23382338 # Report error if some of the variables could not be solved. In that
23392339 # case assume that all variables have type Any to avoid extra
23402340 # bogus error messages.
2341- for i , inferred_type in enumerate (inferred_args ):
2341+ for inferred_type , tv in zip (inferred_args , callee_type . variables ):
23422342 if not inferred_type or has_erased_component (inferred_type ):
23432343 # Could not infer a non-trivial type for a type variable.
2344- self .msg .could_not_infer_type_arguments (
2345- callee_type , callee_type .variables [i ], context
2346- )
2344+ self .msg .could_not_infer_type_arguments (callee_type , tv , context )
23472345 inferred_args = [AnyType (TypeOfAny .from_error )] * len (inferred_args )
23482346 # Apply the inferred types to the function type. In this case the
23492347 # return type must be CallableType, since we give the right number of type
You can’t perform that action at this time.
0 commit comments