Skip to content

Commit 3348ff4

Browse files
committed
Test: fix and enable test
After removing the implicit conditional conformance synthesis for inverses, this test wasn't updated.
1 parent 3e77e8d commit 3348ff4

File tree

1 file changed

+9
-23
lines changed

1 file changed

+9
-23
lines changed

test/Generics/inverse_signatures.swift

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// RUN: %target-swift-frontend -enable-experimental-feature NoncopyableGenerics -enable-experimental-feature NonescapableTypes -verify -typecheck %s -debug-generic-signatures -debug-inverse-requirements 2>&1 | %FileCheck %s --implicit-check-not "error:"
22

3-
// REQUIRES: noncopyable_generics
4-
// XFAIL: noncopyable_generics
5-
63
// CHECK-LABEL: (file).genericFn@
74
// CHECK: Generic signature: <T where T : Copyable, T : Escapable>
85
func genericFn<T>(_ t: T) {}
@@ -189,30 +186,19 @@ struct Cond<T: ~Copyable>: ~Copyable {}
189186
extension Cond: Copyable where T: Copyable {}
190187

191188

192-
// CHECK-LABEL: .ImplicitCond@
189+
// CHECK-LABEL: .FullyGenericArg@
193190
// CHECK: Generic signature: <T>
194191
// CHECK-NEXT: Canonical generic signature: <τ_0_0>
195-
struct ImplicitCond<T: ~Escapable & ~Copyable> {}
192+
struct FullyGenericArg<T: ~Escapable & ~Copyable> {}
196193

197-
// CHECK-LABEL: StructDecl name=ImplicitCond
198-
// CHECK-NEXT: (normal_conformance type="ImplicitCond<T>" protocol="Sendable"
199-
// CHECK-NOT: (assoc_conformance type="Self" proto="Escapable"
194+
// CHECK-LABEL: StructDecl name=FullyGenericArg
195+
// CHECK-NEXT: (builtin_conformance type="FullyGenericArg<T>" protocol="Copyable")
196+
// CHECK-NEXT: (builtin_conformance type="FullyGenericArg<T>" protocol="Escapable")
200197

201-
// CHECK-LABEL: ExtensionDecl line={{.*}} base=ImplicitCond
198+
// CHECK-LABEL: ExtensionDecl line={{.*}} base=FullyGenericArg
202199
// CHECK: Generic signature: <T>
203200
// CHECK-NEXT: Canonical generic signature: <τ_0_0>
204201

205-
// CHECK-LABEL: ExtensionDecl line={{.*}} base=ImplicitCond
206-
// CHECK-NEXT: (normal_conformance type="ImplicitCond<T>" protocol="Empty")
207-
extension ImplicitCond: Empty where T: ~Copyable, T: ~Escapable {}
208-
209-
210-
// NOTE: the following extensions were implicitly synthesized, so they appear at the end!
211-
212-
// CHECK-LABEL: ExtensionDecl line={{.*}} base=ImplicitCond
213-
// CHECK: (normal_conformance type="ImplicitCond<T>" protocol="Copyable"
214-
// CHECK-NEXT: (requirement "T" conforms_to "Copyable"))
215-
216-
// CHECK-LABEL: ExtensionDecl line={{.*}} base=ImplicitCond
217-
// CHECK: (normal_conformance type="ImplicitCond<T>" protocol="Escapable"
218-
// CHECK-NEXT: (requirement "T" conforms_to "Escapable"))
202+
// CHECK-LABEL: ExtensionDecl line={{.*}} base=FullyGenericArg
203+
// CHECK-NEXT: (normal_conformance type="FullyGenericArg<T>" protocol="Empty")
204+
extension FullyGenericArg: Empty where T: ~Copyable, T: ~Escapable {}

0 commit comments

Comments
 (0)