Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Oct 2, 2023
1 parent eb10475 commit a0fdfee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/Polyfill/Nullability/NullabilityInfoContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ public NullabilityInfo Create(PropertyInfo propertyInfo)
if (setter != null)
{
var parameters = setter.GetParameters();

CheckNullabilityAttributes(nullability, parameters[parameters.Length-1].GetCustomAttributesData());
}
else
Expand Down
8 changes: 1 addition & 7 deletions src/Tests/NullabilitySync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,7 @@ public async Task Run()
.Replace(".IsGenericMethodParameter", ".IsGenericMethodParameter()")
.Replace("SR.NullabilityInfoContext_NotSupported", "\"NullabilityInfoContext is not supported\"")
.Replace(
"CheckNullabilityAttributes(nullability, setter.GetParameters()[^1].GetCustomAttributesData());",
"""
var parameters = setter.GetParameters();
CheckNullabilityAttributes(nullability, parameters[parameters.Length-1].GetCustomAttributesData());
""")
.Replace(
"CheckNullabilityAttributes(nullability, setter.GetParameters()[^1].GetCustomAttributesData());",
"CheckNullabilityAttributes(nullability, setter.GetParametersAsSpan()[^1].GetCustomAttributesData());",
"""
var parameters = setter.GetParameters();
CheckNullabilityAttributes(nullability, parameters[parameters.Length-1].GetCustomAttributesData());
Expand Down

0 comments on commit a0fdfee

Please sign in to comment.