CastNullableToNonNullableType false positive on platform types #6146
Labels
bug
good first issue
Issue that is easy to pickup for people that are new to the project
help wanted
Observed Behavior
as GradleInternal
is reportedExpected Behavior
No report, because
Project.gradle
is defined as:Notice that there's no nullability annotation, only javadoc, but there's a package-level annotation:
Looks like this might be a type resolution issue, because the IDE infers non-null:
Anyway, the problem exists on all platform types, even when there's no annotation.
Steps to Reproduce
Cast any function or property result which has platform type. For example
Context
When the inferred type is platform type because there's no nullability defined in Java APIs, by definition we're free to interpret that as nullable or non-nullable. So these should be ignored, or at least ignorable by a flag (and I would vote for that flag to be turned on by default to avoid lots of false positives).
Your Environment
--scan
option when running the gradle task): N/Acc @atulgpt as author
The text was updated successfully, but these errors were encountered: