You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect the output of this compile log statement to indicate that the type of d is [*c]const u8, the same as foo.
After discussion it would seem [*]const u8 would be a more reasonable type for d.
Actual Behavior
On stage1 the compiler outputs the type [*c]const u8 in the compiler log output, however stage2 reports the type of d to be *const allowzero u8.
The text was updated successfully, but these errors were encountered:
Sirius902
added
the
bug
Observed behavior contradicts documented or intended behavior
label
Aug 20, 2022
@nektro Right, I think [*]const u8 would make more sense here. The main issue with stage2's current approach is that a multi pointer is becoming a single pointer, making d pretty much unusable.
Sirius902
changed the title
Stage3 orelse type inference incorrect
Stage2 orelse type inference incorrect
Aug 21, 2022
Zig Version
0.10.0-dev.3659+e5e6eb983
Steps to Reproduce
Compile the following zig program.
Expected Behavior
I expect the output of this compile log statement to indicate that the type ofd
is[*c]const u8
, the same asfoo
.After discussion it would seem
[*]const u8
would be a more reasonable type ford
.Actual Behavior
On stage1 the compiler outputs the type
[*c]const u8
in the compiler log output, however stage2 reports the type ofd
to be*const allowzero u8
.The text was updated successfully, but these errors were encountered: