Avatar
norio_nomura 4/14/2020 4:06 AM
@swift-4.0.3 @swift-4.1.3 @swift-4.2.4 @swift-5.0.3 @swift-5.1.5 @swift-5.2.5 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) }