Skip to content

Take zero-arity into account when uncurrying #2897

Description

@alfonsogarciacaro

Right now the uncurrying mechanism only takes one-arity into account. However, we usually remove the argument when this is of type unit, so we need to also consider zero-arity.

In JS this hasn't been a problem so far because if we pass an argument to a function without it will simply be ignored. However in Dart, and I assume in other typed languages too, if you try to pass a function like int Function() to an argument expecting int Function(Arg) (where Arg is a generic of the enclosing method), the compiler will complain.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions