Skip to content

Commit

Permalink
Fix assertionThat generic argument, fixes #99 (#100)
Browse files Browse the repository at this point in the history
The Quality should be contra-variant in T
  • Loading branch information
dmfs authored Aug 23, 2023
1 parent 9ebc4d6 commit e801a3f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ public final class AssertionThat<T> implements Assertion
{
private final String mName;
private final T mInstance;
private final Quality<T> mQuality;
private final Quality<? super T> mQuality;


public AssertionThat(String name, T instance, Quality<T> quality)
public AssertionThat(String name, T instance, Quality<? super T> quality)
{
mName = name;
mInstance = instance;
mQuality = quality;
}


public AssertionThat(T instance, Quality<T> quality)
public AssertionThat(T instance, Quality<? super T> quality)
{
this("", instance, quality);
}
Expand Down

0 comments on commit e801a3f

Please sign in to comment.