Skip to content

Commit

Permalink
Compiler error for Enumerable#sum on union type
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Dec 11, 2024
1 parent ed7dce3 commit d484246
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/enumerable.cr
Original file line number Diff line number Diff line change
Expand Up @@ -2292,7 +2292,7 @@ module Enumerable(T)
# if the type is a union.
def self.first
{% if X.union? %}
{{X.union_types.first}}
{% raise "Cannot determine type" %}
{% else %}
X
{% end %}
Expand Down

0 comments on commit d484246

Please sign in to comment.