Skip to content
New issue

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

UselessCallOnNotNull: fix false positive for unresolved types #4880

Merged
merged 1 commit into from Jun 1, 2022
Merged

UselessCallOnNotNull: fix false positive for unresolved types #4880

merged 1 commit into from Jun 1, 2022

Commits on May 31, 2022

  1. UselessCallOnNotNull: fix false positive for unresolved types

    Fix an issue where UselessCallOnNotNull would report issues when some of the argument types resolved as ErrorType. While it correctly handles cases where the BindingContext cannot resolve a type (the first test case), in cases where a call is made on an unknown type (the second test case, e.g. via takeIf{}) the BindingContext will report it as an ErrorType. Since ErrorType.isNullable() apparently returns false we need to make an exception to ensure the rule behaves as expected.
    dzirbel committed May 31, 2022
    Configuration menu
    Copy the full SHA
    7626f69 View commit details
    Browse the repository at this point in the history