Skip to content

Add Call.new constructor overload without obj parameter#15441

Merged
straight-shoota merged 4 commits intocrystal-lang:masterfrom
straight-shoota:feat/call.new-noobj
Feb 12, 2025
Merged

Add Call.new constructor overload without obj parameter#15441
straight-shoota merged 4 commits intocrystal-lang:masterfrom
straight-shoota:feat/call.new-noobj

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