Using placeholder syntax for anonymous functions is limited to expressions . In code, you are trying to use a wildcard in an assignment statement that does not match the expression.
If you look closely at the error, you will see that the expression on the right side of your destination is what expands into an anonymous function.
Given what you are trying to accomplish, however, you may consider the following
userJars = userJars ++ JarBuilder.findContainingJar(clazz)
source share