Got bit by this.
Adding a coercion from Foo.class to boolean.class is accepted, but then passing a Foo as the test parameter of an If causes an implicit type coercion to Boolean (the wrapper class). The Foo-
>boolean was ignored in favor of Object >String, String->Boolean.
TypeCoercer should either forbid coercions to primitive types, or record the coercion as coercion to the wrapper type.