Bug: CC0022 being raised on using when not assigned #319
Closed
Description
This is incorrectly raising CC0022
:
using (new SomeDisposable()) { }
It shouldn't, as the object created from SomeDisposable
will disposed. The analyzer works as expected when the value is assigned, like so:
using (var d = new SomeDisposable()) { }