---
title: Existential any (ExistentialAny)
framework: swift-compiler
role: article
role_heading: Article
path: swift-compiler/documentation/diagnostics/existential-any
---

# Existential any (ExistentialAny)

any existential type syntax.

## Overview

Overview any was introduced in Swift 5.6 to explicitly mark “existential types”, i.e., abstract boxed types that conform to a set of constraints. For source compatibility, these are not diagnosed by default except for existential types constrained to protocols with Self or associated type requirements (as this was introduced in the same version): protocol Foo {   associatedtype Bar

func foo(_: Bar) }

protocol Baz {}

func pass(foo: Foo) {} // `any Foo` is required instead of `Foo`

func pass(baz: Baz) {} // no warning or error by default for source compatibility When enabled via -enable-upcoming-feature ExistentialAny, the upcoming language feature ExistentialAny will diagnose all existential types without any: func pass(baz: Baz) {} // `any Baz` required instead of `Baz` This will become the default in a future language mode. Migration -enable-upcoming-feature ExistentialAny:migrate Enabling migration for ExistentialAny adds fix-its that prepend all existential types with any as required. No attempt is made to convert to generic (some) types.

## See Also

### Related Documentation

- [SE-0335: Introduce existential any](swift-compiler/documentation/swift-evolution/0335-existential-any.md)

- [Member import visibility (MemberImportVisibility)](swift-compiler/documentation/diagnostics/member-import-visibility.md)
- [nonisolated(nonsending) by Default (NonisolatedNonsendingByDefault)](swift-compiler/documentation/diagnostics/nonisolated-nonsending-by-default.md)
