void () { doTest( """ class TestClass { public void m() { var javax = new Javax(); javax./*Result of 'Javax.unannotated()' is ignored*/unannotated/**/(); javax.assertJ(); javax.errorProne(); var errorProne = new ErrorProne(); errorProne./*Result of 'ErrorProne.unannotated()' is ignored*/unannotated/**/(); errorProne.assertJ(); errorProne.errorProne(); var assertJ = new AssertJ(); assertJ./*Result of 'AssertJ.unannotated()' is ignored*/unannotated/**/(); assertJ.assertJ(); assertJ.errorProne(); } @javax.annotation.CheckReturnValue public static class Javax { int unannotated() { return 3; } @org.assertj.core.util.CanIgnoreReturnValue int assertJ() { return 3; } @com.google.errorprone.annotations.CanIgnoreReturnValue int errorProne() { return 3; } } @com.google.errorprone.annotations.CheckReturnValue public static class ErrorProne { int unannotated() { return 3; } @org.assertj.core.util.CanIgnoreReturnValue int assertJ() { return 3; } @com.google.errorprone.annotations.CanIgnoreReturnValue int errorProne() { return 3; } } @org.assertj.core.util.CheckReturnValue public static class AssertJ { int unannotated() { return 3; } @org.assertj.core.util.CanIgnoreReturnValue int assertJ() { return 3; } @com.google.errorprone.annotations.CanIgnoreReturnValue int errorProne() { return 3; } } } """); }