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
The isA method is intended to be used for plugging into type-checked expressions, such as jmock expectations, or where people want to use type checking as an early warning. instanceOf is where the constraint needs to be more forgiving. In a world with a better type system we probably wouldn't need both.
It looks like this is actually a duplicate of #27 and is still valid. Furthermore, the isA comment states it's a shortcut for is(instanceOf()) but that's not true.
isA()
method currently accepts parameter of typeClass<T>
instead ofClass<?>
.The following example fails to compile:
while one with
instanceOf()
succeeds:The text was updated successfully, but these errors were encountered: