This overload is ambiguous with Var.projectTo(Class, Function, Function) at
the call site: whenever the first argument could plausibly be both a B
and a Class<B> (e.g. a Class literal), the Java compiler cannot
decide between the two overloads and reports an ambiguity error. Use
Var.projectTo(Class, Object, Function, Function) instead, which supplies an
explicit Class<B>and a null-object and is unambiguous.
Var.projectTo(Class, Function, Function)at the call site: whenever the first argument could plausibly be both aBand aClass<B>(e.g. aClassliteral), the Java compiler cannot decide between the two overloads and reports an ambiguity error. UseVar.projectTo(Class, Object, Function, Function)instead, which supplies an explicitClass<B>and a null-object and is unambiguous.