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

Relax delegate's setter detection #14282

Merged

Conversation

HertzDevil
Copy link
Contributor

#<=, #>=, #==, #!=, and #=== will now forward any number of arguments or blocks. #[]= will now forward blocks.

The base compiler must be one that already has #14159 applied, otherwise the existing behavior is used (#[]= doesn't forward blocks, others forward only a single positional argument). This check is not robust and relies only on compare_versions(Crystal::VERSION, "1.12.0-dev") >= 0.

@straight-shoota straight-shoota added this to the 1.12.0 milestone Feb 6, 2024
@straight-shoota straight-shoota merged commit b6fc5d5 into crystal-lang:master Feb 8, 2024
57 checks passed
@HertzDevil HertzDevil deleted the feature/delegate-setter branch February 18, 2024 12:18
straight-shoota added a commit that referenced this pull request Sep 6, 2024
Macros inject code into other scopes. Paths are resolved in the expanded scope and there can be namespace conflicts.
This fixes non-global paths in macro bodies that expand into uncontrolled scopes where namespaces could clash.

This is a fixup for #14282 (released in 1.12.0).
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