Skip to content

Crash when returning primitive types #4

@robinwit

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". 🙈)

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