Skip to content

Commit

Permalink
fix: promise .all should not enforce nilable types
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach committed Jan 6, 2020
1 parent 47b7a53 commit 9ab4259
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/promise.cr
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ abstract class Promise

# Returns the result of all the promises or the first failure
collective_action :all do |promises|
result = DeferredPromise(typeof(promises.map(&.type_var))?).new
result = DeferredPromise(typeof(promises.map(&.type_var))).new
spawn(same_thread: true) do
begin
result.resolve(promises.map(&.get))
Expand Down

0 comments on commit 9ab4259

Please sign in to comment.