blob: a50d1ef26daea28a7570e0c59f4930260ce7a3f5 [file] [log] [blame]
// RUN: %target-typecheck-verify-swift
protocol P { }
func foo<T: P>(_: T) {}
func bar<T: P>(_: T.Type) {}
func open(existential: P, mutExistential: inout P) {
_openExistential(existential, do: foo)
_openExistential(type(of: existential), do: bar)
_openExistential(mutExistential, do: foo)
_openExistential(type(of: mutExistential), do: bar)
}