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

Hover on symbol in a function with functional argument causes parse error #345

Closed
renkun-ken opened this issue Sep 29, 2020 · 0 comments · Fixed by #346
Closed

Hover on symbol in a function with functional argument causes parse error #345

renkun-ken opened this issue Sep 29, 2020 · 0 comments · Fixed by #346
Labels

Comments

@renkun-ken
Copy link
Member

test <- function(var1 = 0,
  var2 = function(x) length(x) == 0) {
  var2
}

Hover on var2 in the function body, the following error occurs:

internal error: Error: <text>:1:37: unexpected ')'
1: function(result) length(result) == 0)
                                        ^
Call: parse(text = func_text, keep.source = FALSE)
Stack trace:
1: parse(text = func_text, keep.source = FALSE)
2: hover_reply(id, uri, self$workspace, document, point)
3: self$deliver(hover_reply(id, uri, self$workspace, document, point))
4: dispatch(self, id, params)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant