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

Avoid using Comparable(self) in reference types #6549

Closed
wants to merge 1 commit into from

Conversation

bcardiff
Copy link
Member

Fixes #6547.

This is a workaround fix.

There seems to be an issue with type guessed ivars and generics and self that I'm trying to narrow it down. But maybe it also involves macros that lucky quite much since I wasn't able to frame it yet.

Meanwhile this PR removes include Comparable(self) from reference types (leaving it only in Enum and some specs).

@bcardiff bcardiff added the kind:bug A bug in the code. Does not apply to documentation, specs, etc. label Aug 16, 2018
@bcardiff bcardiff added this to the Next milestone Aug 16, 2018
@straight-shoota
Copy link
Member

I like this change anyway because it is more explicit.

@bcardiff
Copy link
Member Author

FYI, related discussion in #3972 (comment) that leads to revert the lazy evaluation of self.

@bcardiff
Copy link
Member Author

With #6557 merges this can be closed actually.

@RX14 RX14 removed this from the 0.26.1 milestone Aug 20, 2018
@RX14 RX14 closed this Aug 20, 2018
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crystal/src/string.cr:139: can't declare variable with Self
5 participants