Skip to content

Commit 1153f33

Browse files
committed
[NotNullWhen(true)]
Looks like attributes are allowed forlocal functions now
1 parent 21bf033 commit 1153f33

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • ReflectionAnalyzers/Helpers/Reflection/Filters

ReflectionAnalyzers/Helpers/Reflection/Filters/Types.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,7 @@ internal bool TryMostSpecific(ISymbol? x, ISymbol? y, Compilation compilation, [
105105
if (ByNull(x, y, out unique) ||
106106
ByNull(y, x, out unique))
107107
{
108-
#pragma warning disable CS8762 // Parameter must have a non-null value when exiting in some condition.
109108
return true;
110-
#pragma warning restore CS8762 // Parameter must have a non-null value when exiting in some condition.
111109
}
112110

113111
if (this.Expressions.IsEmpty)
@@ -118,7 +116,7 @@ internal bool TryMostSpecific(ISymbol? x, ISymbol? y, Compilation compilation, [
118116

119117
return this.TryMostSpecific(x as IMethodSymbol, y as IMethodSymbol, compilation, out unique);
120118

121-
static bool ByNull(ISymbol? first, ISymbol? other, out ISymbol? result)
119+
static bool ByNull(ISymbol? first, ISymbol? other, [NotNullWhen(true)] out ISymbol? result)
122120
{
123121
if (first is null &&
124122
other is not null)

0 commit comments

Comments
 (0)