-
-
Notifications
You must be signed in to change notification settings - Fork 798
False positive in OptionalUnit rule #2452
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
Comments
Unfortunately, the mentioned code snippet doesn't compile. I don't know how you would want to detect this case in the |
The code now compiles. I think that it's not that difficult... I'll give it a try. |
I'm curious, how would you want to decide whether the |
You are right, I wasn't thinking about that! I was just thinking about an |
I don’t think it’s a good idea to reimplement this just for the sake of fixing this false-positive. This could fix the original problem, but it results in other false-positives. |
Expected Behavior
This code is correct. I need to add Unit at the end of
B
becauseif
is not an expression soexhaustive
fails.Observed Behavior
This code is flagged
Context
I want to force exhaustive
when
s so I need to do things like this. Maybe I'm missing an easier and more elegant way to do it, if so, please tell me.Your Environment
The text was updated successfully, but these errors were encountered: