Skip to content

Resolve types in types_have_same_zig_comptime_repr #4359

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

Closed
wants to merge 2 commits into from

Conversation

LemonBoy
Copy link
Contributor

@LemonBoy LemonBoy commented Feb 1, 2020

Calling type_has_bits instead of type_has_bits2 makes the compiler crash
and burn if one of the two types passed in are not resolved yet.

Closes #4357

Calling type_has_bits instead of type_has_bits2 makes the compiler crash
and burn if one of the two types passed in are not resolved yet.

Closes ziglang#4357
@andrewrk andrewrk closed this in f247a90 Mar 4, 2020
alexnask pushed a commit to alexnask/zig that referenced this pull request Mar 5, 2020
And fix most of the fallout. This also makes optional pointers not
require resolving zero bits, because the comptime value struct layout no
longer depends on whether the type has zero bits.

Thanks to @LemonBoy for the behavior test case

Closes ziglang#4357
Closes ziglang#4359
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.

Assertion at analyze.cpp:5576 when compiling -- implicit cast to *c_void problem
1 participant