I think that Matej is right - those types are not assignable according to the spec rules. Injected foo.someMethod() should return a long value but FooImpl could simply return any comparable leading into class cast exception.