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

peer type resolution for [*]T and *[N]T #4865

Closed
andrewrk opened this issue Mar 30, 2020 · 0 comments · Fixed by #5117
Closed

peer type resolution for [*]T and *[N]T #4865

andrewrk opened this issue Mar 30, 2020 · 0 comments · Fixed by #5117
Labels
accepted This proposal is planned. contributor friendly This issue is limited in scope and/or knowledge of Zig internals. proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone

Comments

@andrewrk
Copy link
Member

ir_resolve_peer_types needs another case.

test "peer types: [*]T and *[N]T" {
    var array: [8192]u8 = undefined;
    var derp: [*]const u8 = undefined;

    const T = @TypeOf(&array, derp);
    @compileLog(T);
}

The resolved type is the unknown pointer. It should additionally work if either of them is const, with the resolved type having const

@andrewrk andrewrk added contributor friendly This issue is limited in scope and/or knowledge of Zig internals. proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. accepted This proposal is planned. labels Mar 30, 2020
@andrewrk andrewrk added this to the 0.7.0 milestone Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted This proposal is planned. contributor friendly This issue is limited in scope and/or knowledge of Zig internals. proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant