-
Notifications
You must be signed in to change notification settings - Fork 822
Open incorrectly considered unused #7111
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
Closing as duplicate of #3347 Unfortunately there is definitely a bug in the open declarations analyzer. Subtle, but this will happen from time to time. Would definitely welcome a PR that investigated this - the feature is fairly testable. |
Better than being a duplicate...I think this bug was fixed. I can't reproduce it any more with this environment. Operating system: Windows 10 Not sure how to obtain that environment again to reproduce the bug either. |
There's definitely been a lot of bug fixes and general improvements since the VS 16.1 release. Glad it doesn't reproduce! |
This particular case was fixed in #6846. |
I have an
open
statement that Visual Studio says is unused, but if I remove it, then the code doesn't compile.Repro steps
When using the
open
statement:With the
open
statement removed:Expected behavior
I think this
open
statement is being used, so my expectation is that Visual Studio would not suggest to remove it.Actual behavior
Visual Studio suggests to remove an
open
statement that seems to be in use.Known workarounds
Ignore the suggestion from Visual Studio to remove the
open
statement.Related information
The text was updated successfully, but these errors were encountered: