Skip to content

Commit

Permalink
Address the feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
tarekgh authored and github-actions committed Nov 9, 2022
1 parent f789785 commit 1d6c42e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -584,11 +584,11 @@ private static void BindConcreteDictionary(
return;
}

MethodInfo tryGetValue = dictionaryType.GetMethod("TryGetValue")!;
MethodInfo tryGetValue = dictionaryType.GetMethod("TryGetValue", BindingFlags.Public | BindingFlags.Instance)!;

Debug.Assert(dictionary is not null);
// dictionary should be of type Dictionary<,> or of type implementing IDictionary<,>
PropertyInfo setter = dictionary.GetType().GetProperty("Item", BindingFlags.Public | BindingFlags.Instance)!;
PropertyInfo? setter = dictionary.GetType().GetProperty("Item", BindingFlags.Public | BindingFlags.Instance);
if (setter is null || !setter.CanWrite)
{
// Cannot set any item on the dictionary object.
Expand Down

0 comments on commit 1d6c42e

Please sign in to comment.