Unknown symbols in function calls are not highlighted? #10380
-
|
I noticed some potential inconsistency in the way unknown symbols are highlighted by the LSP: hello # "No symbol named 'hello' in scope."
if (hello) { # "No symbol named 'hello' in scope."
TRUE
}
sum(hello) # No highlightThis looks like a bug and I didn't find a related issue but maybe I missed something? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Because of non standard evaluation in R, it is incredibly hard to know if So I'd say it's not a bug, it's a current limitation in our system that we are very aware of, but we haven't felt the need to open a whole bunch of issues related to this. |
Beta Was this translation helpful? Give feedback.
Because of non standard evaluation in R, it is incredibly hard to know if
sum(hello)is going to treathelloas if it is coming from the surrounding environment, or ifsum()itself is going toquote()that first input, which would mean this would be totally valid R code. So right now we choose not to do anything until we have better tools for this.So I'd say it's not a bug, it's a current limitation in our system that we are very aware of, but we haven't felt the need to open a whole bunch of issues related to this.