Files
swift-mirror/test/ModuleInterface/conformance_suppression.swift
Nate Chandler 60cdbb84a5 [Features] Move NoncopyableGenerics up.
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
2024-05-23 10:12:01 -07:00

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 {}