Skip to content

Commit

Permalink
Fixed small bug in detection of wrongly implemented unions
Browse files Browse the repository at this point in the history
  • Loading branch information
david-driscoll committed Feb 1, 2018
1 parent 6e4f492 commit 5e52432
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Extensions/Unions/UnionHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ public static IReadOnlyDictionary<object, Type> GetUnion(TypeInfo typeInfo)
.Where(rootType.IsAssignableFrom)
.Where(x => x.GetCustomAttributes<UnionAttribute>().Any())
.Where(x => !x.IsAbstract)
.Select(x => x.GetCustomAttribute<UnionAttribute>().Value)
.Distinct()
.ToArray();

var values = Enum.GetValues(enumType)
Expand Down

0 comments on commit 5e52432

Please sign in to comment.