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

Compiler: make sure to remove literal types before instantiating matches #6284

Merged

Conversation

asterite
Copy link
Member

Fixes #6239

When initial lookup matches fail, we do a second lookup with "literal types", for the automatic cast. If there are matches, those literal types must be converted back to the real types (because those literal types are just used for the lookup, they are fictitious). This was done in a few places, but apparently not in all of them.

This PR changes the code to make sure that, before instantiating those matches, if the lookup was done with those literal types, they are removed.

@ysbaddaden
Copy link
Contributor

ysbaddaden commented Jun 28, 2018

Weird CI failure on macOS. Unrelated: #6283

@ysbaddaden ysbaddaden merged commit b0d67e1 into crystal-lang:master Jun 28, 2018
@RX14 RX14 modified the milestones: 0.26.0, Next Jun 28, 2018
@asterite asterite deleted the bug/6239-literals-not-removed branch June 29, 2018 13:53
@RX14 RX14 modified the milestones: Next, 0.26.0 Jul 30, 2018
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.

None yet

4 participants