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

Add Call.new constructor overload without obj parameter #15441

Merged

Conversation

straight-shoota
Copy link
Member

Many calls don't have a receiver and so there are a lot of Call.new instantiations without a receiver object, which means the first argument obj is nil.

This patch introduces two new constructor overloads which lack the obj parameter. This removes a lot of noise at hundreds of call sites (especially in parser_spec.cr).

@straight-shoota straight-shoota self-assigned this Feb 10, 2025
@straight-shoota straight-shoota changed the title Add Call.new overload without obj parameter Add Call.new constructor overload without obj parameter Feb 10, 2025
@straight-shoota straight-shoota added this to the 1.16.0 milestone Feb 10, 2025
@straight-shoota straight-shoota merged commit be74adf into crystal-lang:master Feb 12, 2025
71 checks passed
@straight-shoota straight-shoota deleted the feat/call.new-noobj branch February 12, 2025 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants