Skip to content

Reject undefined as type #2566

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

Merged
merged 1 commit into from
May 28, 2019
Merged

Reject undefined as type #2566

merged 1 commit into from
May 28, 2019

Conversation

LemonBoy
Copy link
Contributor

@LemonBoy LemonBoy commented May 27, 2019

Make analyze_type_expr behave like ir_resolve_type when the user tries
to use undefined as a type.

Perhaps it's better to amend the specification (and the compiler) and make undefined castable to everything but type.

Closes #2436

Make analyze_type_expr behave like ir_resolve_type when the user tries
to use `undefined` as a type.

Closes ziglang#2436
@andrewrk
Copy link
Member

Let's go with this change for now and see if the existing spec causes any more issues. #1947 addresses this as well. Thanks for the patch!

@andrewrk andrewrk merged commit 528c151 into ziglang:master May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

undefined type on a struct member causes compiler crash
2 participants