-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
ControlFlowAnalysis.EndPointIsReachable appears to be thrown off by a local function #42447
Labels
Comments
Moving to the compiler team - this is a compiler API |
In VS 17.11.5, using the sample code above I'm getting it dimmed and the compiler emits a warning about the code being unreachable at that location, so this must be fixed already I assume |
@Rekkonnect What does hte api produce though? |
louis-z
added a commit
to louis-z/Meziantou.Analyzer
that referenced
this issue
Oct 23, 2024
Several years ago, an issue was reported (dotnet/roslyn#42447) and bypassed in the AvoidUsingRedundantElseAnalyzer code. It appears that issue has been resolved (dotnet/roslyn#42447 (comment)), which now allows us to simplify the code a bit.
meziantou
pushed a commit
to meziantou/Meziantou.Analyzer
that referenced
this issue
Oct 24, 2024
* Simplify AvoidUsingRedundantElseAnalyzer Several years ago, an issue was reported (dotnet/roslyn#42447) and bypassed in the AvoidUsingRedundantElseAnalyzer code. It appears that issue has been resolved (dotnet/roslyn#42447 (comment)), which now allows us to simplify the code a bit.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Version Used:
Microsoft.CodeAnalysis.CSharp.Workspaces 2.10.0
(I know it's an old version)
Steps to Reproduce:
Analyze control flow on the following
if
block:Expected Behavior:
EndPointIsReachable == false
According to the EndPointIsReachable documentation:
In this case, the last statement (
value++;
) is unreachable.Actual Behavior:
EndPointIsReachable == true
Here's the complete code I used to test this behavior:
The text was updated successfully, but these errors were encountered: