Use "<? super T>" for all arguments of anyOf · Pull Request #257 · hamcrest/JavaHamcrest
Thanks @phoenix384, I was able to reproduce your issue after a bit of effort. Because Hamcrest itself is compiled with sourceCompatibility = JavaVersion.VERSION_1_7, the problem doesn't appear in that project. However, if I set up a new project with a Hamcrest as a dependency, and use sourceCompatibility = JavaVersion.VERSION_1_8, JDK 1.11 couldn't compile.