|
1 | 1 | // 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:" |
2 | 2 |
|
3 | | -// REQUIRES: noncopyable_generics |
4 | | -// XFAIL: noncopyable_generics |
5 | | - |
6 | 3 | // CHECK-LABEL: (file).genericFn@ |
7 | 4 | // CHECK: Generic signature: <T where T : Copyable, T : Escapable> |
8 | 5 | func genericFn<T>(_ t: T) {} |
@@ -189,30 +186,19 @@ struct Cond<T: ~Copyable>: ~Copyable {} |
189 | 186 | extension Cond: Copyable where T: Copyable {} |
190 | 187 |
|
191 | 188 |
|
192 | | -// CHECK-LABEL: .ImplicitCond@ |
| 189 | +// CHECK-LABEL: .FullyGenericArg@ |
193 | 190 | // CHECK: Generic signature: <T> |
194 | 191 | // CHECK-NEXT: Canonical generic signature: <τ_0_0> |
195 | | -struct ImplicitCond<T: ~Escapable & ~Copyable> {} |
| 192 | +struct FullyGenericArg<T: ~Escapable & ~Copyable> {} |
196 | 193 |
|
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") |
200 | 197 |
|
201 | | -// CHECK-LABEL: ExtensionDecl line={{.*}} base=ImplicitCond |
| 198 | +// CHECK-LABEL: ExtensionDecl line={{.*}} base=FullyGenericArg |
202 | 199 | // CHECK: Generic signature: <T> |
203 | 200 | // CHECK-NEXT: Canonical generic signature: <τ_0_0> |
204 | 201 |
|
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