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 negation of null values. #16101

Merged
merged 4 commits into from
Jun 26, 2024
Merged

Fix negation of null values. #16101

merged 4 commits into from
Jun 26, 2024

Commits on Jun 24, 2024

  1. Add tests for binding negation operator.

    Expected results come from 11.0.x branch.
    grokys committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    92bf199 View commit details
    Browse the repository at this point in the history
  2. Unset and null need to be distinct.

    Also remove `ExpressionNode.Reset` as it was doing unneeded stuff and should just be the same as `SetSource(AvaloniaProperty.UnsetValue, null);`.
    grokys committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    a041a33 View commit details
    Browse the repository at this point in the history
  3. Make ExpressionNode.OnSourceChanged accept null.

    The previous design assumed that a source of `null` was an invalid input to all types of expression nodes. It turned out that there was a single exception to this rule: the `!` operator can in fact operate on a null value. With this new design we instead have to explicitly check for a null value in every override of `OnSourceChanged ` except in `LogicalNotNode`.
    
    Due to this change, we also have to distinguish between `null` and `(unset)` in `ExpressionNode.SetSource` as well.
    
    Fixes #16071
    grokys committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    8a9b2de View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2024

  1. Fix comment.

    grokys committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    4ea01b3 View commit details
    Browse the repository at this point in the history