Skip to content

hidden variable names leak into normal namespace #3705

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

Open
tldrlol opened this issue Oct 7, 2017 · 3 comments
Open

hidden variable names leak into normal namespace #3705

tldrlol opened this issue Oct 7, 2017 · 3 comments
Labels
Area-Compiler-PatternMatching pattern compilation, active patterns, performance, codegen Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code.
Milestone

Comments

@tldrlol
Copy link

tldrlol commented Oct 7, 2017

let add _ _ = _arg1 + _arg2

[<EntryPoint>]
let main _ =
  printfn "%d" (add 1 2)
  0

The above snippet compiles, runs and works (as expected). I imagine this is an oversight, buggy behavior that was not intended to happen. Specifically, being able to alias the arguments denoted by the ignore pattern with _arg[n] syntax.

On the plus side, tooling (vanilla VS2017) does not offer Intellisense or anything of the sort in this situation.

@tldrlol
Copy link
Author

tldrlol commented Oct 7, 2017

Apologies, I should clarify.

While they do not appear in the completion lists, hovering over them reveals type information as normal.

@Krzysztof-Cieslak
Copy link
Contributor

I can report same in VSCode - no intellisense, tooltips are working, finding usages is working

image

image

@tldrlol
Copy link
Author

tldrlol commented Oct 7, 2017

I had to calm down before posting this, because this was too funny also: 😄

I spoke too soon.

tooling-help

drvink added a commit to drvink/visualfsharp that referenced this issue Oct 7, 2017
@dsyme dsyme added Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. Area-Compiler labels Oct 9, 2017
@cartermp cartermp added this to the 16.0 milestone Aug 29, 2018
@cartermp cartermp modified the milestones: 16.0, 16.1 Feb 21, 2019
@cartermp cartermp modified the milestones: 16.1, 16.2 Apr 23, 2019
@cartermp cartermp modified the milestones: 16.2, Backlog Apr 30, 2019
@dsyme dsyme added Area-Compiler-PatternMatching pattern compilation, active patterns, performance, codegen and removed Area-Compiler labels Mar 31, 2022
@vzarytovskii vzarytovskii moved this to Not Planned in F# Compiler and Tooling Jun 17, 2022
@vzarytovskii vzarytovskii reopened this Jan 5, 2024
@github-project-automation github-project-automation bot moved this from Done to In Progress in F# Compiler and Tooling Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compiler-PatternMatching pattern compilation, active patterns, performance, codegen Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code.
Projects
Archived in project
Development

No branches or pull requests

6 participants