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
When working on a structure, ZLS offers completion for methods inside a non-method. What I mean by that is that if a function defined on a structure isn't a method (first parameter structure's type), it should not be able to access methods like:
Here, fn4 isn't a method and yet completion shows all methods with matching name.
If there is a way to identify the first parameter's type and notice that it's a method, we could even go a step further and show completion to "smart insert" methods like in Rust:
The text was updated successfully, but these errors were encountered:
theres nothing stopping you from using any of those other functions from within fn4, you might have/create an instance of Foo. methods arent anything magical in zig
When working on a structure, ZLS offers completion for methods inside a non-method. What I mean by that is that if a function defined on a structure isn't a method (first parameter structure's type), it should not be able to access methods like:
Here,
fn4
isn't a method and yet completion shows all methods with matching name.If there is a way to identify the first parameter's type and notice that it's a method, we could even go a step further and show completion to "smart insert" methods like in Rust:
The text was updated successfully, but these errors were encountered: