Skip to content

Crash when returning primitive types #4

Description

@robinwit
dispatch_promise(^{
    return 3;
}).then(^(NSInteger i) {
    //
});

This crashes here since the return type is obviously not id.
I don't know what's the cleanest way to solve this. It's kind of acceptable that primitive types don't work. Maybe even leave it as-is and update the docs, or start supporting it?

(I caught this when accidentally returning "string" instead of @"string". 🙈)

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions