Skip to content

when.join different types #8

@diegooliveira

Description

@diegooliveira

Hi, I have two promises with different outcomes. When I try to join then I receive a compile error due the way the method When#join uses the type parameter.

Promisse<User> user = loadUser(email);
Promisse<LastCharge> lastCharge = loadLastCharge(email);
when.join(user, lastCharge)
//              ^- Error here
    .then(result -> {
        return null;
    });

The vertx API CompositeFuture#join has some helper method that uses different type parameter for each position, allowing that kind of code. There are any plan to have something in the same line for when.java?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions