roslynator icon indicating copy to clipboard operation
roslynator copied to clipboard

RCS1102 False-positive when class is used as a type argument

Open bsal649 opened this issue 1 year ago • 2 comments
trafficstars

Product and Version Used: Roslynator.Analyzers 4.12.3

Steps to Reproduce: Have a class such as below:

public class Create<TEntity, TOut> where TEntity : Common

And a usage of the class as seen here:

_ = services.AddValidatorsFromAssemblyContaining<Create<Foo, Bar>>();

Actual Behavior: RCS1102 is raised. If the fixer is used, a C# error is raised at the usage:

'Create<Foo, Bar>': static types cannot be used as type arguments[CS0718]

Expected Behavior: RCS1102 is not raised.

bsal649 avatar May 27 '24 23:05 bsal649