-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Guice hints when the only difference between two types is when on…
…e is a wildcard type and the other is a non-wildcard type that is mentioned in the extends/super clause of the wildcard type (e.g. Optional<Foo> vs. Optional<? extends Foo>). PiperOrigin-RevId: 696949702
- Loading branch information
1 parent
7b8cc46
commit e032518
Showing
7 changed files
with
184 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...m/google/inject/errors/testdata/missing_implementation_has_unnecessary_extends_clause.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Unable to create injector, see the following errors: | ||
|
||
1) [Guice/MissingImplementation]: No implementation for MissingImplementationErrorKtTest$Producer<? extends MissingImplementationErrorKtTest$Foo> was bound. | ||
|
||
Did you mean? | ||
* MissingImplementationErrorKtTest$Producer<MissingImplementationErrorKtTest$Foo> bound at MissingImplementationErrorKtTest$InjectionHasUnnecessaryExtendsClauseModule.provideProducerOfFoo(MissingImplementationErrorKtTest.kt:53) | ||
|
||
Requested by: | ||
1 : MissingImplementationErrorKtTest$InjectionHasUnnecessaryExtendsClauseModule.injectProducerOfFoo(MissingImplementationErrorKtTest.kt:58) | ||
\_ for 1st parameter unused | ||
at MissingImplementationErrorKtTest$InjectionHasUnnecessaryExtendsClauseModule.injectProducerOfFoo(MissingImplementationErrorKtTest.kt:58) | ||
|
||
Learn more: | ||
https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION | ||
|
||
1 error | ||
|
||
====================== | ||
Full classname legend: | ||
====================== | ||
MissingImplementationErrorKtTest$Foo: "com.google.inject.errors.MissingImplementationErrorKtTest$Foo" | ||
MissingImplementationErrorKtTest$InjectionHasUnnecessaryExtendsClauseModule: "com.google.inject.errors.MissingImplementationErrorKtTest$InjectionHasUnnecessaryExtendsClauseModule" | ||
MissingImplementationErrorKtTest$Producer: "com.google.inject.errors.MissingImplementationErrorKtTest$Producer" | ||
======================== | ||
End of classname legend: | ||
======================== |
26 changes: 26 additions & 0 deletions
26
...com/google/inject/errors/testdata/missing_implementation_has_unnecessary_super_clause.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Unable to create injector, see the following errors: | ||
|
||
1) [Guice/MissingImplementation]: No implementation for MissingImplementationErrorKtTest$Consumer<? super MissingImplementationErrorKtTest$Foo> was bound. | ||
|
||
Did you mean? | ||
* MissingImplementationErrorKtTest$Consumer<MissingImplementationErrorKtTest$Foo> bound at MissingImplementationErrorKtTest$InjectionHasUnnecessarySuperClauseModule.provideConsumerOfFoo(MissingImplementationErrorKtTest.kt:98) | ||
|
||
Requested by: | ||
1 : MissingImplementationErrorKtTest$InjectionHasUnnecessarySuperClauseModule.injectConsumerOfFoo(MissingImplementationErrorKtTest.kt:103) | ||
\_ for 1st parameter unused | ||
at MissingImplementationErrorKtTest$InjectionHasUnnecessarySuperClauseModule.injectConsumerOfFoo(MissingImplementationErrorKtTest.kt:103) | ||
|
||
Learn more: | ||
https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION | ||
|
||
1 error | ||
|
||
====================== | ||
Full classname legend: | ||
====================== | ||
MissingImplementationErrorKtTest$Consumer: "com.google.inject.errors.MissingImplementationErrorKtTest$Consumer" | ||
MissingImplementationErrorKtTest$Foo: "com.google.inject.errors.MissingImplementationErrorKtTest$Foo" | ||
MissingImplementationErrorKtTest$InjectionHasUnnecessarySuperClauseModule: "com.google.inject.errors.MissingImplementationErrorKtTest$InjectionHasUnnecessarySuperClauseModule" | ||
======================== | ||
End of classname legend: | ||
======================== |
26 changes: 26 additions & 0 deletions
26
.../test/com/google/inject/errors/testdata/missing_implementation_missing_extends_clause.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Unable to create injector, see the following errors: | ||
|
||
1) [Guice/MissingImplementation]: No implementation for MissingImplementationErrorKtTest$Producer<MissingImplementationErrorKtTest$Foo> was bound. | ||
|
||
Did you mean? | ||
* MissingImplementationErrorKtTest$Producer<? extends MissingImplementationErrorKtTest$Foo> bound at MissingImplementationErrorKtTest$InjectionMissingExtendsClauseModule.configure(MissingImplementationErrorKtTest.kt:118) | ||
|
||
Requested by: | ||
1 : MissingImplementationErrorKtTest$InjectionMissingExtendsClauseModule.injectProducerOfFoo(MissingImplementationErrorKtTest.kt:36) | ||
\_ for 1st parameter unused | ||
at MissingImplementationErrorKtTest$InjectionMissingExtendsClauseModule.injectProducerOfFoo(MissingImplementationErrorKtTest.kt:36) | ||
|
||
Learn more: | ||
https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION | ||
|
||
1 error | ||
|
||
====================== | ||
Full classname legend: | ||
====================== | ||
MissingImplementationErrorKtTest$Foo: "com.google.inject.errors.MissingImplementationErrorKtTest$Foo" | ||
MissingImplementationErrorKtTest$InjectionMissingExtendsClauseModule: "com.google.inject.errors.MissingImplementationErrorKtTest$InjectionMissingExtendsClauseModule" | ||
MissingImplementationErrorKtTest$Producer: "com.google.inject.errors.MissingImplementationErrorKtTest$Producer" | ||
======================== | ||
End of classname legend: | ||
======================== |
26 changes: 26 additions & 0 deletions
26
core/test/com/google/inject/errors/testdata/missing_implementation_missing_super_clause.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Unable to create injector, see the following errors: | ||
|
||
1) [Guice/MissingImplementation]: No implementation for MissingImplementationErrorKtTest$Consumer<MissingImplementationErrorKtTest$Foo> was bound. | ||
|
||
Did you mean? | ||
* MissingImplementationErrorKtTest$Consumer<? super MissingImplementationErrorKtTest$Foo> bound at MissingImplementationErrorKtTest$InjectionMissingSuperClauseModule.configure(MissingImplementationErrorKtTest.kt:118) | ||
|
||
Requested by: | ||
1 : MissingImplementationErrorKtTest$InjectionMissingSuperClauseModule.injectConsumerOfFoo(MissingImplementationErrorKtTest.kt:81) | ||
\_ for 1st parameter unused | ||
at MissingImplementationErrorKtTest$InjectionMissingSuperClauseModule.injectConsumerOfFoo(MissingImplementationErrorKtTest.kt:81) | ||
|
||
Learn more: | ||
https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION | ||
|
||
1 error | ||
|
||
====================== | ||
Full classname legend: | ||
====================== | ||
MissingImplementationErrorKtTest$Consumer: "com.google.inject.errors.MissingImplementationErrorKtTest$Consumer" | ||
MissingImplementationErrorKtTest$Foo: "com.google.inject.errors.MissingImplementationErrorKtTest$Foo" | ||
MissingImplementationErrorKtTest$InjectionMissingSuperClauseModule: "com.google.inject.errors.MissingImplementationErrorKtTest$InjectionMissingSuperClauseModule" | ||
======================== | ||
End of classname legend: | ||
======================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters