diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/CanIgnoreReturnValueSuggesterTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/CanIgnoreReturnValueSuggesterTest.java index b355a7f75d4..1239cf047bd 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/CanIgnoreReturnValueSuggesterTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/CanIgnoreReturnValueSuggesterTest.java @@ -830,4 +830,21 @@ public void providesMethod_b267362954() { .expectUnchanged() .doTest(); } + + @Test + public void providesWithoutChangingType_b267463718() { + helper + .addInputLines( + "ExampleModule.java", + "package com.google.frobber;", + "public final class ExampleModule {", + " @com.google.inject.Provides", + " boolean provideEnableNewRiskAssignment(boolean enableNewRiskAssignment) {", + " return enableNewRiskAssignment;", + " }", + "}") + // we don't fire because @Provides is @Keep + .expectUnchanged() + .doTest(); + } }