- Notifications
You must be signed in to change notification settings - Fork825
[RFC FS-1046] Wildcard self identifier. Allow single underscore in members.#6829
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
dnfclas commentedMay 23, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@gusty is there a language suggestion change that maps to this? Generally I'm in favor. Another interesting one (if you're digging around in there) is Error message kinda sucks, and the resolution is a double |
gusty commentedMay 23, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Yes, it's approved in principle, seefsharp/fslang-suggestions#333 I've never thought about the |
@gusty Thanks! |
Thanks a lot for trying to take care of this wart ;) |
Note: this code fixer can also be changed with this PR:https://github.com/dotnet/fsharp/blob/master/vsintegration/src/FSharp.Editor/CodeFix/RenameUnusedValue.fs#L73 |
gusty commentedMay 23, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I had a look at how it works right now and it already considers unused bindings everything that doesn't start with an underscore, so we're good to change the renamer too. |
@cartermp I adjusted the renamer, as you suggested. |
targeting fsharp47 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nice,
thx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Love it, thanks a lot@gusty
pauldorehill commentedSep 26, 2019
Love this update, however I noticed that it doesn't work with an accessibility modifier:
Do you want me to open a separate issue? |
Good catch ! I've just added a PR (#7631) that will cover that case. |
…mbers. (dotnet#6829)* Add Underscore Dot rule* Update tests* Revert line where x is used* Code fix rename to single underscore
…mbers. (dotnet#6829)* Add Underscore Dot rule* Update tests* Revert line where x is used* Code fix rename to single underscore
Uh oh!
There was an error while loading.Please reload this page.
This allows writing a single underscore in member definitions, ie
member _.DoSomething()
.