Remove some null suppressions, add [NotNullWhen]

このコミットが含まれているのは:
Sergio Pedri committed 2023-06-14 23:19:13 +02:00
1 親 94002a662b
コミット aad8dd8d95
10ファイル変更
+17 -17

検索条件に一致するファイルはありません

+1 -2
ファイルの表示
@@ -79,8 +79,7 @@ public sealed class AutoConstructorGenerator : IIncrementalGenerator
// Check whether the field is annotated to have a special behavior
if (fieldSymbol.Type.TryGetAttributeWithFullyQualifiedMetadataName("ComputeSharp.AutoConstructorBehaviorAttribute", out AttributeData? usageData) &&
usageData!.ConstructorArguments is { Length: 1 } arguments &&
arguments[0].Value is (int)AutoConstructorBehavior.IgnoreAndSetToDefault)
usageData.ConstructorArguments is [{ Value: (int)AutoConstructorBehavior.IgnoreAndSetToDefault }])
{
defaulted.Add(fieldSymbol.Name);
}