Add a compiler warning for lowercase literals in patterns#666
Add a compiler warning for lowercase literals in patterns#666dungpa wants to merge 4 commits intodotnet:masterfrom dungpa:literals
Conversation
|
I like it, and it looks good from my review. |
|
@neoeinstein Thanks for reviewing. It's really useful. |
|
Very important warning. Great job! 👍 |
There was a problem hiding this comment.
I'm not sure it will happen. The check is there to make sure that the index access (name.[0]) is totally safe.
There was a problem hiding this comment.
Ok me neither. However it does seem surprising that a identifier is the empty string.
|
This looks good to me. |
|
committed. |
|
@KevinRansom I think it's better to reference the PR number and the issue number (if there is one) in the commit message. As it is committed now, it's really hard to blame the original author for bugs in the original PR :-). |
|
I screwed up the commit, I just reverted and am going to attribute it properly. |
|
A quick look at the PR # explains everything! |
|
When I rebased, I forgot to set the author correctly. There are many times when I wished we just pressed the merge button. Once again sorry for the brain-fart. Now it's time for bed. Kevin |
|
Dude, you are the one that is merging. Just make that decision to use the merge button. ;-) |
|
@KevinRansom No worries. I don't mind at all. The main problem is traceability and maintainability that we have to be careful when merging PRs. |
|
@forki 👍 |
UserVoice request (approved for F# 4.x): http://fslang.uservoice.com/forums/245727-f-language/suggestions/6668206-warn-when-literal-attribute-is-used-with-lowercase
This is a small and low-risk change to warn users when lowercase literals are ignored in favor of variable binding patterns.
Unit tests have been added.