Skip to content

Commit

Permalink
making ResolvedUnionType constructor take a list
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomassetti committed Nov 25, 2017
1 parent 38a6cab commit 020cace
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -35,7 +35,7 @@
public class ResolvedUnionType implements ResolvedType { public class ResolvedUnionType implements ResolvedType {
private List<ResolvedType> elements; private List<ResolvedType> elements;


public ResolvedUnionType(Collection<ResolvedType> elements) { public ResolvedUnionType(List<ResolvedType> elements) {
if (elements.size() < 2) { if (elements.size() < 2) {
throw new IllegalArgumentException("An union type should have at least two elements. This has " + elements.size()); throw new IllegalArgumentException("An union type should have at least two elements. This has " + elements.size());
} }
Expand Down

0 comments on commit 020cace

Please sign in to comment.