Skip to content

Commit

Permalink
[bug] Prevent failing tests and add explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink committed Aug 26, 2019
1 parent 15846ba commit 233ddfa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Src/FluentAssertions/Common/TypeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ public static bool IsDecoratedWith<TAttribute>(this Type type, bool inherit = fa
private static IEnumerable<TAttribute> GetCustomAttributes<TAttribute>(MemberInfo type, bool inherit = false)
where TAttribute : Attribute
{
return type.GetCustomAttributes(inherit).OfType<TAttribute>();
// Do not use as extension method here, there is an issue with PropertyInfo and EventInfo
// preventing the inherit option to work.
return CustomAttributeExtensions.GetCustomAttributes(type, inherit).OfType<TAttribute>();
}

private static IEnumerable<TAttribute> GetCustomAttributes<TAttribute>(Type type, bool inherit = false)
Expand Down

0 comments on commit 233ddfa

Please sign in to comment.