Skip to content

Some classes override operator == with a nullable parameter #117838

Closed

Description

@srawlins

At runtime, a null value is never passed to ==. No class should ever expect that it might get a nullable type.

I see the following two operator == overrides which accept a nullable parameter:

warning • The parameter type of '==' operators should be non-nullable • packages/flutter/lib/src/material/about.dart:759:17 • non_nullable_equals_parameter
warning • The parameter type of '==' operators should be non-nullable • packages/flutter/test/rendering/mouse_tracker_cursor_test.dart:465:17 • non_nullable_equals_parameter

See dart-lang/sdk#58753 which will soon be enforced.

Activity

  1. added
    in triagePresently being triaged by the triage team
    c: contributor-productivityTeam-specific productivity, code health, technical debt.
    frameworkflutter/packages/flutter repository. See also f: labels.
    a: null-safetySupport for Dart's null safety feature
    and removed
    in triagePresently being triaged by the triage team
    on Jan 2, 2023
  2. added
    P1High-priority issues at the top of the work list
    on Jan 3, 2023
  3. added
    r: fixedIssue is closed as already fixed in a newer version
    on Jan 4, 2023
  4. github-actions commented on Mar 4, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  5. locked as resolved and limited conversation to collaborators on Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: null-safetySupport for Dart's null safety featurec: contributor-productivityTeam-specific productivity, code health, technical debt.frameworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions