You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find Eclipse doesn't like the suggested Expect.java code with the 0.12 library.
This is Java 1.6, Eclipse 3.6's response to the suggested Long:
public static <T extends Long, M extends LongMatcher<T, M>> LongMatcher<T, ?> expect(T actual) {
return wrapped(LongMatcher.class, actual);
}
Test.java:
@test
public void trivial()
{
long ten = 10;
expect(ten).toBe(10L);
//Eclipse shows an error: Bound mismatch: The generic method expect(T) of type Expect is not applicable for the arguments (Long). The inferred type ObjectMatcher<Long,ObjectMatcher<Long,M>> is not a valid substitute for the bounded parameter <M extends ObjectMatcher<T,M>>
}
Eclipse is only happy if have expect()s like this:
Boolean works happily from great-expectations 0.12 - already having this sort of expect() - but String fails in a similar way.
Am I using the wrong version of Java? Is this something else Eclipse is deficient in? I didn't see a set of minimum versions specified in the readme file.
I'm using Ubuntu Oneric, in case it's relevant.
Thanks.
The text was updated successfully, but these errors were encountered:
Hi.
I find Eclipse doesn't like the suggested Expect.java code with the 0.12 library.
This is Java 1.6, Eclipse 3.6's response to the suggested Long:
public static <T extends Long, M extends LongMatcher<T, M>> LongMatcher<T, ?> expect(T actual) {
return wrapped(LongMatcher.class, actual);
}
Test.java:
@test
public void trivial()
{
long ten = 10;
expect(ten).toBe(10L);
//Eclipse shows an error: Bound mismatch: The generic method expect(T) of type Expect is not applicable for the arguments (Long). The inferred type ObjectMatcher<Long,ObjectMatcher<Long,M>> is not a valid substitute for the bounded parameter <M extends ObjectMatcher<T,M>>
}
Eclipse is only happy if have expect()s like this:
public static ComparableMatcher<T, ?> expect (T actual) {
return wrapped(ComparableMatcher.class, actual);
}
Boolean works happily from great-expectations 0.12 - already having this sort of expect() - but String fails in a similar way.
Am I using the wrong version of Java? Is this something else Eclipse is deficient in? I didn't see a set of minimum versions specified in the readme file.
I'm using Ubuntu Oneric, in case it's relevant.
Thanks.
The text was updated successfully, but these errors were encountered: