Produce analyzer errors for invalid generic arguments in converters and validators

Closes #103
This commit is contained in:
Oleksii Holub
2022-04-16 22:54:11 +00:00
committed by GitHub
parent c7015181e1
commit 41cb8647b5
20 changed files with 188 additions and 61 deletions

View File

@@ -22,7 +22,7 @@ public class ParameterMustBeSingleIfNonScalarAnalyzer : AnalyzerBase
type.DisplayNameMatches("System.String") ||
!type.AllInterfaces
.Select(i => i.ConstructedFrom)
.Any(s => s.DisplayNameMatches("System.Collections.Generic.IEnumerable<T>"));
.Any(t => t.DisplayNameMatches("System.Collections.Generic.IEnumerable<T>"));
private void Analyze(
SyntaxNodeAnalysisContext context,