groostav
03/10/2017, 2:49 AMProvider interface is covariant by rites: It defines a single method that takes no arguments and returns a type of its type parameter, identical to `() -> T`(which is effectively kotlin.Function<out R>)
- the call-site covariant marker out is preserved at runtime as <? extends Whatever>. When guice reflects on a constructor that has a Provider<out Something> it attempts to look for a method to provision an out Something rather than simply trying to provision a Something. So you get an internal guice error "expected a class [... or other normal type], but <? extends Whatever> is a WildcardType [and therefore cannot be resolved]