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

Fix bug for c structs assigned to a type #9743

Merged

Conversation

matthewmcgarvey
Copy link
Contributor

Fixes #8774

When instance variables of C structs were accessed through a type declaration it failed because it was looking for instance variables on the TypeDefType instead of the type that it was representing.

Copy link
Member

@asterite asterite left a comment

Choose a reason for hiding this comment

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

Looks great!

@bcardiff bcardiff added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:codegen labels Sep 29, 2020
@bcardiff bcardiff added this to the 1.0.0 milestone Sep 29, 2020
@bcardiff bcardiff merged commit e64e872 into crystal-lang:master Sep 29, 2020
@matthewmcgarvey matthewmcgarvey deleted the c-struct-instance-methods branch September 29, 2020 15:58
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:codegen
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiler bug when trying to access struct field
4 participants