Skip to content

SA1101 mis-fires on generic local method in .NET Core 3 Preview #3018

@mgurlitz

Description

@mgurlitz

When I compile this example with .NET framework, I don't get any warnings, but with .NET Core 3 Preview, I get "warning SA1101: Prefix local calls with this" on the line return Quux<int>().

I checked this occurs with any of:

  • StyleCopAnalyzers version 1.02, 1.1.118, or 1.2.0-beta.66
  • .NET Core 3.0.100-preview7-012821, 3.0.100-rc1-014004, or 3.0.100-rc1-014181.
    public class TestClass
    {
        private int foobar = 1;

        public int Foo()
        {
            int Quux<T>() => this.foobar;
            return Quux<int>();
        }
    }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions