mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Some compilers have the NoncopyableGenerics feature enabled via interesting mechanisms but do not have ConformanceSuppression. To support such compilers, the NoncopyableGenerics feature must appear before ConformanceSuppression in the list of features. Otherwise, when parsing the portion of the swiftinterface corresponding to an entity which involves both features, the first check will be for NoncopyableGenerics (which that old compiler has) and the code inside will involve ConformanceSuppression (which that old compiler does not have). rdar://128611158
17 lines
823 B
Swift
17 lines
823 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name Mojuel
|
|
// RUN: %FileCheck %s < %t.swiftinterface
|
|
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface -module-name Mojuel)
|
|
|
|
// CHECK: #if compiler(>=5.3) && $ConformanceSuppression
|
|
// CHECK-NEXT: public enum RecollectionOrganization<T> : ~Swift.BitwiseCopyable, Swift.Copyable where T : ~Copyable {
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: #elseif compiler(>=5.3) && $NoncopyableGenerics
|
|
// CHECK-NEXT: public enum RecollectionOrganization<T> : Swift.Copyable where T : ~Copyable {
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: #else
|
|
// CHECK-NEXT: public enum RecollectionOrganization<T> {
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: #endif
|
|
public enum RecollectionOrganization<T : ~Copyable> : ~BitwiseCopyable, Copyable {}
|