Skip to content

Commit 4caab15

Browse files
committed
fix warnings
1 parent f302df3 commit 4caab15

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

ReflectionAnalyzers/NodeAnalzers/ActivatorAnalyzer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ private static bool TryGetCreatedType(IMethodSymbol createInstance, InvocationEx
105105
private static bool IsMissingDefaultConstructor(IMethodSymbol createInstance, InvocationExpressionSyntax invocation, INamedTypeSymbol createdType)
106106
{
107107
if (createdType.TypeKind == TypeKind.Interface)
108+
{
108109
return false;
110+
}
109111

110112
if (createInstance.IsGenericMethod &&
111113
!HasDefaultConstructor())

ReflectionAnalyzers/NodeAnalzers/BindingFlagsAnalyzer.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,13 @@ internal static bool HasDuplicate(BinaryExpressionSyntax flags, [NotNullWhen(tru
157157
return false;
158158
}
159159

160-
using (var walker = Borrow(flags))
160+
using var walker = Borrow(flags);
161+
if (walker is { isUnHandled: false, duplicate: { } })
161162
{
162-
if (walker is { isUnHandled: false, duplicate: { } })
163-
{
164-
dupe = walker.duplicate;
165-
walker.flags.RemoveAt(walker.flags.LastIndexOf(dupe));
166-
expectedFlags = Format(walker.flags);
167-
return true;
168-
}
163+
dupe = walker.duplicate;
164+
walker.flags.RemoveAt(walker.flags.LastIndexOf(dupe));
165+
expectedFlags = Format(walker.flags);
166+
return true;
169167
}
170168

171169
return false;

0 commit comments

Comments
 (0)