This project is read-only.

Problem with SA1101

Sep 16, 2011 at 11:40 AM
Edited Sep 16, 2011 at 11:55 AM

In the routine CopyTo3ReadOnly() in ListBaseTests.cs of the UnitTests project of the PowerCollections project from CodePlex

      this.CheckArray(array1, new[] { "foo", "bar", "baz", "Sailor", "the", "hello" });
      list2.CopyTo(0, array1, 0, 0);
      CheckArray<string>(array1, new string[] { "foo", "bar", "baz", "Sailor", "the", "hello" });
      list2.CopyTo(0, array1, 6, 0);
      CheckArray<string>(array1, new string[] { "foo", "bar", "baz", "Sailor", "the", "hello" });

If I accept R#'s recommendation to remove the redundant type argument specification marked in bold, I get SA1101 for that line. Fixing it is simple but why is not the message issued before removing the type argument?

When I run a recheck all, the recheck fails to find this issue, yet I go back to the routine and the StyleCop/R# integration shows it.  Adding a "this." is sytactically valid.

(Incidentally, I have been using StyleCop quite sucessfully except that I have been unable to turn on the debugging)