Closed dscopra closed 7 years ago
The problem is, that the analysis of the MethodInvocation never checks if the return type implements IDisposable and therefore should be checked at all.
DisposableAnalyser:308
if (type == null) { }
else if (node.IsParentADisposeCallIgnoringParenthesis())
Should be:
if (type == null) { }
else if (!ImplementsIDisposable(type)) return;
else if (node.IsParentADisposeCallIgnoringParenthesis())
Prerequisites
Description
When using extension any methods within a property, there is an Property not disposed warning, besides there is no IDisposable at all. When using an ExpressionBody instead, the warning disappears.
Source Code
Screenshot