Description
When a given type implements an implicit conversion that can return null, S8969 does not take this into consideration.
Reproducer
internal sealed class Foo
{
public static implicit operator string?(Foo foo)
{
return null;
}
public static void Do(Foo foo)
{
string x = foo!; // S8969 is reported while the implicit operator can effectively return null
}
}
Product and Version
SonarAnalyzer.CSharp version 10.33.0.1635
Description
When a given type implements an implicit conversion that can return null, S8969 does not take this into consideration.
Reproducer
Product and Version
SonarAnalyzer.CSharp version 10.33.0.1635