Skip to content

Enable -enable-upcoming-feature ExistentialAny for Swift files #181005

Open

Description

@LongCatIsLooong

Similar to strict concurrency, existential any is going to be enabled by default in the future.

It is not enabled yet in Swift 6, but it will be in a future language version:

The Language Steering Group has decided that one previously-accepted upcoming feature, ExistentialAny, will not be enabled by default in Swift 6. SE-0335: Introduce existential any introduces the any keyword to identify existential types. The proposal also specifies that "bare" protocol names will no longer be permitted as types---they must either use any or some, as appropriate---under the upcoming feature flag ExistentialAny. Given the concerns about migration to consistent use of existential any in the language, and the expectation that additional language improvements will be coming that might affect the end result of that migration, the Language Steering Group is deferring the source-incompatible changes in SE-0335 to a future language revision.

Per SE-0335:

Transitioning to any
The new any syntax will be staged in over several major Swift releases. In the release where any is introduced, the compiler will not emit diagnostics for the lack of any on existential types, save for the aforementioned cases. After any is introduced, warnings will be added to guide programmers toward the new syntax. Finally, a missing any will become an unconditional error, or plain protocol names may be repurposed — in Swift 6 or a later language mode.

Related: #147347

Activity

  1. changed the title [-]Enable `-enable-upcoming-feature ExistentialAny`[/-] [+]Enable `-enable-upcoming-feature ExistentialAny` for Swift files[/+] on Jan 14, 2026
  2. added
    in triagePresently being triaged by the triage team
    c: proposalA detailed proposal for a change to Flutter
    c: new featureNothing broken; request for a new capability
    platform-iosiOS applications specifically
    team-iosOwned by iOS platform team
    and removed
    in triagePresently being triaged by the triage team
    on Jan 15, 2026
  3. added
    P2Important issues not at the top of the work list
    triaged-iosTriaged by iOS platform team
    on Jan 15, 2026
  4. jmagman commented on Jan 15, 2026

    @jmagman
    Member

    In the packages repo you can enforce it in CI like this:
    flutter/packages#10788

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterplatform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions