Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a formatting error in the "missing argument" error #10325

Merged
merged 1 commit into from
Jan 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/compiler/crystal/semantic/call_error.cr
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ class Crystal::Call
private def no_overload_matches_message(io, full_name, defs, args, arg_types, named_args_types)
if message = single_def_error_message(defs, named_args_types)
io << message
io << '\n'
Comment on lines 191 to +192
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
io << message
io << '\n'
io.puts message

return
end

Expand Down Expand Up @@ -301,6 +302,7 @@ class Crystal::Call
raise(String.build do |str|
if single_message = single_def_error_message(defs, named_args_types)
str << single_message
str << '\n'
Comment on lines 304 to +305
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
str << single_message
str << '\n'
str.puts single_message

else
str << "wrong number of arguments for '"
str << full_name(owner, def_name)
Expand Down