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
Currently, curry instances returned from decorating methods with curry doesn't eliminate the self argument, which issues a type error when trying to call a curried method:
frompfunimportcurryclassC:
@currydeff(x: int, y: int) ->int: ...
reveal_type(C().f) # note: Revealed type is 'pfun.functions.Curry[def (self: test_types.C, x: builtins.int, y: builtins.int) -> builtins.int]'C().f(1) # error: Argument 1 to "__call__" of "Curry" has incompatible type "int"; expected "C"
The main issue in fixing this is finding a way to distinguish this call to curry with a call with an instance that has a __call__ method in e.g:
Currently, curry instances returned from decorating methods with
curry
doesn't eliminate theself
argument, which issues a type error when trying to call a curried method:The main issue in fixing this is finding a way to distinguish this call to curry with a call with an instance that has a
__call__
method in e.g:The text was updated successfully, but these errors were encountered: