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: Prevent eager instance_sizeof on structs #11856

Merged
merged 1 commit into from
Mar 2, 2022
Merged

Fix: Prevent eager instance_sizeof on structs #11856

merged 1 commit into from
Mar 2, 2022

Conversation

mattrberry
Copy link
Contributor

This change prevents eager instance_sizeof on structs, since it causes the compiler to crash in some cases and it is already reported as an error in the CleanupTransformer anyway. This change allows the AST to make it to the CleanupTransformer, producing the expected error.

Fixes #11855

@straight-shoota straight-shoota added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:semantic labels Feb 27, 2022
@straight-shoota straight-shoota added this to the 1.4.0 milestone Feb 28, 2022
@straight-shoota straight-shoota changed the title Prevent eager instance_sizeof on structs Fix: Prevent eager instance_sizeof on structs Mar 2, 2022
@straight-shoota straight-shoota merged commit e73fdaa into crystal-lang:master Mar 2, 2022
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.

instance_sizeof on abstract struct w/ multiple substructs crashes the compiler
3 participants