Skip to content

Commit

Permalink
SAVEPOINT
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisdoomen committed Sep 29, 2024
1 parent a8e7f17 commit ecad064
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 254 deletions.
4 changes: 2 additions & 2 deletions Src/FluentAssertions/Common/TypeMemberReflector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private static List<TMemberInfo> GetMembersFromHierarchy<TMemberInfo>(
return GetInterfaceMembers(typeToReflect, getMembers);
}

return GetClassMembers(typeToReflect, getMembers);
return GetClassMembers(typeToReflect, getMembers).Union(GetInterfaceMembers(typeToReflect, getMembers)).ToList();
}

private static List<TMemberInfo> GetInterfaceMembers<TMemberInfo>(Type typeToReflect,
Expand Down Expand Up @@ -161,7 +161,7 @@ private static List<TMemberInfo> GetClassMembers<TMemberInfo>(Type typeToReflect
}
}

typeToReflect = typeToReflect.BaseType;
typeToReflect = typeToReflect.BaseType != typeof(object) ? typeToReflect.BaseType : null;
}

return members;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<IsPackable>false</IsPackable>
<NoWarn>$(NoWarn),IDE0052,1573,1591,1712</NoWarn>
<DebugType>full</DebugType>
<LangVersion>12</LangVersion>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net47'">
Expand Down
Loading

0 comments on commit ecad064

Please sign in to comment.