roslynator icon indicating copy to clipboard operation
roslynator copied to clipboard

RCS1202 Avoid NullRef - Needs to be more strict

Open zitcomdev opened this issue 5 years ago • 0 comments
trafficstars

Steps to Reproduce:

interface Foo {
  bool? Get();
}

class Bar {
  void DoStuff(Foo foo) {
    var x = foo.Get().Value;
  }
}

Actual Behavior: RCS1202 Avoid NullRef not triggered

Expected Behavior: RCS1202 Avoid NullRef should be triggered

Other: Think RCS1202 should be a warning by default.

zitcomdev avatar Aug 05 '20 08:08 zitcomdev