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

Order _ after any other Path when comparing overloads #12855

Merged

Conversation

HertzDevil
Copy link
Contributor

@HertzDevil HertzDevil commented Dec 19, 2022

Fixes #12854. The snippet there now produces the same overload order whether -Dpreview_overload_order is defined or not (but as shown there this bugfix isn't limited to the behavior of that flag).

This happens because Crystal::Path#restriction_of?(other, ...) incorrectly overrides Crystal::ASTNode#restriction_of?(other : Underscore, ...); the PR adds the corresponding overloads in Path and other node types that do the same thing.

@HertzDevil HertzDevil added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:semantic labels Dec 19, 2022
@straight-shoota straight-shoota added this to the 1.7.0 milestone Dec 19, 2022
@straight-shoota straight-shoota merged commit 75a3a47 into crystal-lang:master Dec 20, 2022
@HertzDevil HertzDevil deleted the bug/underscore-overload-order branch December 23, 2022 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:semantic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recursive splat expansion with preview_overload_order
2 participants