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

Possible bug in ServiceParseTreeWalk.fs #14513

Closed
cmeeren opened this issue Dec 26, 2022 · 1 comment · Fixed by #14518
Closed

Possible bug in ServiceParseTreeWalk.fs #14513

cmeeren opened this issue Dec 26, 2022 · 1 comment · Fixed by #14518
Milestone

Comments

@cmeeren
Copy link
Contributor

cmeeren commented Dec 26, 2022

While experimenting with AST traversal for a new linter and looking through existing traversal code in FCS, I came across this line:

| SynExpr.LetOrUse (_, isRecursive, synBindingList, synExpr, range, _) ->

Note that it ignores the first parameter, and binds the second parameter to isRecursive. However, in the definition of LetOrUse, the first parameter is named isRecursive. The second one is isUse.

| LetOrUse of isRecursive: bool * isUse: bool * bindings: SynBinding list * body: SynExpr * range: range * trivia: SynExprLetOrUseTrivia

This indicates a bug somewhere. I am incluned to think it's in ServiceParseTreeWalk.fs.

@T-Gro
Copy link
Member

T-Gro commented Dec 28, 2022

Thanks for catching it, this is indeed a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants