Skip to content

[Foundation] The operators in the various NS[Mutable][Ordered]Set[<T>] classes are inconsistent. #24430

@rolfbjarne

Description

@rolfbjarne

Task:

  • Look at the various NSSet classes in src/Foundation/
  • Make sure the operators treat null/empty/non-empty input the same way. In particular:
    • Addition operators must return null if and only if both operands are null
    • Subtraction operators must return null if the first operand is null, irrespective of what the second operator is.
    • The operators must have [return: NotNullIfNotNull] attributes when applicable.
  • The xml docs should be matching as much as possible.
  • Make sure all operators are well tested with unit tests (in the tests/monotouch-test/Foundation directory)

Assign to Copilot once #17285 is complete, to avoid conflicting results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions