Skip to content

Commit

Permalink
Update NullabilityInfoContext.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Oct 2, 2023
1 parent c0d4bb4 commit eb10475
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Polyfill/Nullability/NullabilityInfoContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ public NullabilityInfo Create(PropertyInfo propertyInfo)

if (setter != null)
{
CheckNullabilityAttributes(nullability, setter.GetParameters()[^1].GetCustomAttributesData());
var parameters = setter.GetParameters();
CheckNullabilityAttributes(nullability, parameters[parameters.Length-1].GetCustomAttributesData());
}
else
{
Expand Down

0 comments on commit eb10475

Please sign in to comment.