Files
swift-mirror/test/ModuleInterface/bitwise_copyable.swift
Nate Chandler 2671652085 [BitwiseCopyable] Avoid a condfail.
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
2024-05-08 16:53:14 -07:00

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