We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation of
public class Test { public <T> Collection<T> clear(Class<T> type) { return Stream.of("abc") .map(type::cast) .toList(); } }
fails with
java: [return] incompatible types in return. type of expression: @Initialized @NonNull List<T extends @Initialized @PolyNull Object> method return type: @Initialized @NonNull Collection<T extends @Initialized @Nullable Object>
function with @PolyNull annotated return type should evaluate based on its argument type (e.g. @NonNull in this case)
@PolyNull
@NonNull
Worked fine in 3.42.0, broken in 3.46.0
The text was updated successfully, but these errors were encountered:
... works fine when lambda is used instead of method reference
public class Test { public <T> Collection<@NonNull T> clear(Class<T> type) { return Stream.of("abc") .map(value -> type.cast(value)) .toList(); } }
Sorry, something went wrong.
@MichalStehlikCz Thanks for the bug reports; we appreciate it.
smillst
No branches or pull requests
Compilation of
fails with
function with
@PolyNull
annotated return type should evaluate based on its argument type (e.g.@NonNull
in this case)Worked fine in 3.42.0, broken in 3.46.0
The text was updated successfully, but these errors were encountered: