mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The standard library defines
```
protocol BitwiseCopyable {}
typealias _BitwiseCopyable = BitwiseCopyable
```
For current compilers, `BitwiseCopyable` is a "known protocol".
For older compilers, it is not; instead `_BitwiseCopyable` is. So
print the following into the swiftinterface for those older compilers:
```
protocol _BitwiseCopyable {}
typealias BitwiseCopyable = _BitwiseCopyable
```
rdar://127755503
18 lines
613 B
Swift
18 lines
613 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name Test
|
|
// RUN: %FileCheck %s < %t.swiftinterface
|
|
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name Test
|
|
|
|
|
|
@frozen
|
|
@_moveOnly
|
|
public struct S_Implicit_Noncopyable {}
|
|
|
|
// CHECK-NOT: extension Test.S_Implicit_Noncopyable : Swift.BitwiseCopyable {}
|
|
|
|
// CHECK: public protocol BitwiseCopyable {
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: public typealias _BitwiseCopyable = Test.BitwiseCopyable
|
|
public protocol BitwiseCopyable {}
|
|
public typealias _BitwiseCopyable = BitwiseCopyable
|