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

Missing completion for functions when using . in initializer (perhaps wrong title) #2072

Closed
bangbangsheshotmedown opened this issue Nov 1, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@bangbangsheshotmedown
Copy link
Contributor

Zig Version

0.14.0-dev.1622+2ac543388

ZLS Version

0.14.0-dev

Client / Code Editor / Extensions

No response

Steps to Reproduce and Observed Behavior

The title is probably wrong, since i don't know how it is called exactly, but i'll try to be precise in the report

const std = @import("std");

const Stuff = struct {
    array: std.ArrayList(i32),
};

pub fn main() !void {
    const allocator = std.heap.page_allocator;
    const stuff = Stuff {
        .array = .init(allocator)         // HERE, i don't get `.init` completion
    };
    
    _=stuff;
}

Expected Behavior

In line 10, i should get completions for functions from std.ArrayList, in that case init function

Relevant log output

No response

@bangbangsheshotmedown bangbangsheshotmedown added the bug Something isn't working label Nov 1, 2024
@Techatrix
Copy link
Member

They are called "decl literals". See ziglang/zig#21264
This issue is tracked in #2027.

@Techatrix Techatrix closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2024
@bangbangsheshotmedown
Copy link
Contributor Author

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants