// RUN: %empty-directory(%t) // RUN: %target-build-swift -O -target %target-cpu-apple-macos15.0 %s -o %t/a.out // RUN: %target-codesign %t/a.out // RUN: %target-run %t/a.out | %FileCheck %s // UNSUPPORTED: use_os_stdlib // UNSUPPORTED: back_deployment_runtime // REQUIRES: OS=macosx // REQUIRES: executable_test protocol A: ~Copyable { associatedtype B } protocol B: ~Copyable {} let a: Any = (any ~Copyable).self // CHECK: any Any print(a) let b: Any = (any ~Escapable).self // CHECK: any Any print(b) let c: Any = (any ~Copyable & ~Escapable).self // CHECK: any Any print(c) let d: Any = (any A).self // CHECK: A print(d) let e: Any = (any B).self // CHECK: B print(e) let f: Any = (any A & B).self // CHECK: A & B print(f) let g: Any = (any A & ~Copyable).self // CHECK: any A print(g) let h: Any = (any B & ~Copyable).self // CHECK: any B print(h) let i: Any = (any A & B & ~Copyable).self // CHECK: any A & B print(i) @inline(never) func test() -> Bool { return [].first == nil } // CHECK: true print(test()) let j: [any (~Copyable & ~Escapable).Type] = [] // CHECK: Array.Type> print(type(of: j)) let k: [(any ~Copyable & ~Escapable).Type] = [] // CHECK: Array<(any Any).Type> print(type(of: k))