Closed GoogleCodeExporter closed 8 years ago
Would the signature: <T, B super T> Matcher<B> instanceOf(Class<T> type) work?
Original comment by nat.pr...@gmail.com
on 22 Nov 2008 at 3:43
sadly, it doesn't compile. There's a more fundamental problem which is that
sometimes we want the binding to
go one way and sometimes the other. David also suggested that we add a typed
with() for the times we need it:
with(List.class, instanceOf(ArrayList.class))
but I'm not sure I like that.
Original comment by smgfree...@gmail.com
on 22 Nov 2008 at 3:59
I'd think we'd only want the binding to go upward from the type being compared
because otherwise the static type checking gives us all the info we're testing.
The "typed" with doesn't work with generic types (like List!) -- that's why
jMock has
to rely on the Java compiler unifying the types.
Original comment by nat.pr...@gmail.com
on 22 Nov 2008 at 5:59
[deleted comment]
I've done some fixing in this are and checked it in
Original comment by smgfree...@gmail.com
on 20 Dec 2008 at 8:58
Original comment by smgfree...@gmail.com
on 21 May 2009 at 10:46
Original comment by smgfree...@gmail.com
on 21 May 2009 at 10:46
Original issue reported on code.google.com by
smgfree...@gmail.com
on 22 Nov 2008 at 12:14