Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Properly model UNSPECIFIED nullness from JSpecify #2177

Open

Description

@msridhar

This will give us a cleaner way to avoid false positives warnings related to unmarked code in JSpecify mode. Right now we have selective one-off checks in various places but that clutters the code if we keep going (see the changes in #2080). A rough idea for how to go about this:

  • For relevant types from unmarked code, make a pass and use a synthetic annotation to mark positions with unspecified nullness (this would exclude positions that have explicit nullability annotations). Fix false positives in override checking of methods with PolyNull models #2143 uses a similar masking approach for dealing with override checking for @PolyNull; probably the logic can be shared.
  • Update generics checking and inference to properly handle unspecified nullness. Given we want to use a "some world" handling of unspecified, I think this basically means anything is a subtype of unspecified (or equal nullability for type arguments), while unspecified is a subtype of anything.

Activity

  1. added
    jspecify
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    jspecify

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions