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

Fix contract in AngularJS plugin. #899

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 10, 2023

  1. Fix contract in AngularJS plugin.

    The contract for `processTupleArgument` is meant to say that the
    function will not return a non-null value if `nullIfNotFound = false`.
    However, the old contract said the opposite: that if the function
    returned a non-null value, then `nullIfNotFound = false`, which is not
    true (if the value is found, `nullIfNotFound` plays no role).
    
    At the moment, the compiler cannot use either contract meaningfully so
    the difference is immaterial.  If https://youtrack.jetbrains.com/issue/KT-63378/Support-or-prohibit-contracts-that-use-Boolean-parameters-on-the-right-of-an-implies
    is resolved and support for this is added, the new contract will allow
    the call-sites that pass `nullIfNotFound = false` to perform a smart
    cast to `List<R>` instead of having to use `!!`.
    jesyspa committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    37346c2 View commit details
    Browse the repository at this point in the history