-
Notifications
You must be signed in to change notification settings - Fork 825
Fix incomplete pattern matches over C# enums producing the wrong warning #5206
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
Conversation
@dotnet-bot test this please |
@@ -154,6 +155,24 @@ let rec pathEq p1 p2 = | |||
| PathEmpty(_), PathEmpty(_) -> true | |||
| _ -> false | |||
|
|||
//// (Temporarily copy-pasted from TypeChecker.fs) |
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.
I don't know where this function should be refactored to as I'm not very well versed in the compiler's file structure. PatternMatchCompilation.fs comes before TypeChecker.fs, but the former needs this function.
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.
(just an opinion) You can expose it for use in TypeChecker.fs, and replace the comment akin to "Comes from TypeChecker.fs, might move to more apropriate place later.".
This would be better than having the code duplicated, and unless it becomes used in a third place, the location is not too important.
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.
@smoothdeveloper I kind of like that idea actually. That way its pretty obvious that not much code depends on it.
@cartermp What is the cause of the CI failure? It reports:
|
cc @matthid - sounds like a FAKE issue on CI? |
@forki Is this the broken .NET SDK installer problem? Where is the other issue about that? |
I only know of Twitter discussion. And the urls worked for us again. /cc
@davkean
Matthias Dittrich <[email protected]> schrieb am Mi., 20. Juni 2018,
21:56:
… @forki <https://github.com/forki> Is this the broken .NET SDK installer
problem? Where is the other issue about that?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5206 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNAo-bN_BV37JUiU-mP1B73mDGQkGks5t-qkHgaJpZM4Uqo0M>
.
|
test Ubuntu16.04 Release_fcs Build Windows_NT Release_fcs Build |
test Windows_NT Release_fcs Build |
So typical try again until it works error? |
@matthid jawohl! |
There's no more for me to do at the moment. Could this be considered for merge? @dsyme |
Thanks for this |
PR #4522 has a bug, causing it to always produce FS0104 for non-F#-defined enum. For example, the following code:
currently produces this compiler warning:
when it is supposed to produce:
This PR corrects the issue.
Thanks to @charlesroddie for identifying the bug.