Closed as duplicate of#55538
Closed as duplicate of#55538
Description
π Search Terms
noUnusedLocals
using
π Version & Regression Information
Present on all releases supporting using
β― Playground Link
π» Code
{
using foo = { [Symbol.dispose]() {} };
}
π Actual behavior
foo
is flagged as unused by noUnusedLocals
π Expected behavior
foo
is not flagged by noUnusedLocals
because it's implicitly used at the end of the scope when its [Symbol.dispose]
property is called.
Additional information about the issue
Not explicitly referencing resources is common (e.g., mutexs) so this feels like a bug.
Metadata
Metadata
Assignees
Labels
No labels