prodot / ReCommended-Extension

Code analysis improvements and context actions
Apache License 2.0
59 stars 11 forks source link

Wrong annotation suggestion for constructors in optimistic analysis mode #7

Closed zwitbaum closed 8 years ago

zwitbaum commented 8 years ago

Steps to reproduce:

  1. Switch ReSharper options to use optimistic analysis mode
  2. Create or open a class in your project with static constructor
  3. Create or open a class in your project with non-static constructor

Result: the extension shows "Declared element is nullable, but is not annotated with 'NotNullAttribute' or 'CanBeNullAttribute'.

Constructors cannot be annotated with these attributes, so this suggestion is wrong here,