-
Notifications
You must be signed in to change notification settings - Fork 41
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
fix: handle case where guard does not produce variable, but a . expr #295
Conversation
I'm currently hunting down a case where ElixirLS is crashing while working on I get the issue about a
There is one other error I'm going to start looking into next as well:
|
We could use it to infer the type of
I can see at least 2 things happening here. First, the code_server is crashing. This could be an OTP issue. Then
this one is rather harmless. The AST seems to contain |
Yeah, the doctoring warning seems harmless.
What format would I return to indicate that here?
Does this sound like something that could/should ultimately crash the language server? Those messages may not be the true cause, but are currently the only thing I have to go on.
Yeah, looked into it, makes sense 👍 |
This is an Erlang bug: erlang/otp#8510 Once the code server crashes, it is game over. Elixir, LS, and others will misbehave. I will try to prioritize a fix for #8510. |
This is a simple fix but may not be the fully correct answer. This essentially discards information in the form of:
From what I can tell, it used to be the case that eventually a root node in guard AST would always resolve to a variable, but now it can resolve to
var.value
.What I'm not sure of is whether or not this
var.value
can be used for something or if it should just be discarded as I'm discarding it.