Files
swift-mirror/test/Constraints/opened_existentials_default_arg.swift
Anthony Latsis 43e82b4f7e Sema: Partially revert existential opening fix
Selectively revert 36683a804c to resolve
a source compatibility regression. See inline comment for use case. We
are going to consider acknowledging this use case in the rules in a
future release.
2025-02-14 22:30:28 +00:00

12 lines
205 B
Swift

// RUN: %target-typecheck-verify-swift -target %target-swift-5.9-abi-triple
do {
protocol P {}
struct S<each T> {}
func foo<T: P>(_: T, _: Optional<S<T>> = nil) {}
let p: any P
foo(p) // OK
}