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: fix a couple of issues with as, as? and unions #7475

Merged
merged 3 commits into from
Feb 22, 2019

Conversation

asterite
Copy link
Member

Fixes #5805
Fixes #7441

The first two commits use .type? instead of .type on a couple of nodes because their types might not be computed yet.

The third commit makes computing a union's type reactive (make it depend on the inner types, and if they change, recompute) and also use .type? instead of .type because of the same reason as above.

@asterite asterite added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:semantic labels Feb 22, 2019
Copy link
Contributor

@ysbaddaden ysbaddaden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trust you here :)

@asterite
Copy link
Member Author

@ysbaddaden hehe, yes, thanks! Eventually the compiler could be simplified, improved and documented a bit more so these changes aren't that cryptic :-)

@asterite asterite added this to the 0.28.0 milestone Feb 22, 2019
@asterite asterite merged commit 202c7fd into crystal-lang:master Feb 22, 2019
@asterite asterite deleted the bug/typeof-and-union branch March 30, 2019 16:34
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.

3 participants