Skip to content

Commit

Permalink
Improve 2 error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
r00ster committed Dec 1, 2018
1 parent 4f5c55d commit 81bc1c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spec/compiler/semantic/tuple_spec.cr
Expand Up @@ -287,7 +287,7 @@ describe "Semantic: tuples" do
pos += {0, 0}
end
),
"tuple too big"
"tuple size cannot be greater than 300"
end

it "doesn't unify tuple metaclasses (#5384)" do
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/crystal/semantic/bindings.cr
Expand Up @@ -519,7 +519,7 @@ module Crystal
end

if types.size > 300
raise "tuple too big: Tuple(#{types[0...10].join(',')}, ...)"
raise "tuple size cannot be greater than 300 (size is #{types.size})"
end

self.type = tuple_type
Expand All @@ -543,7 +543,7 @@ module Crystal
end

if entries.size > 300
raise "named tuple too big: #{named_tuple_type}"
raise "named tuple size cannot be greater than 300 (size is #{entries.size})"
end

self.type = named_tuple_type
Expand Down

0 comments on commit 81bc1c5

Please sign in to comment.